From b6e32a1b185a436bfb18e2db8ae6f1bc51bdce97 Mon Sep 17 00:00:00 2001 From: Davito <1+davito@noreply.localhost> Date: Sun, 27 Sep 2026 23:48:19 +0200 Subject: [PATCH] Release SyncVito 1.0.12 --- build_installer.ps1 | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/build_installer.ps1 b/build_installer.ps1 index abb2a63..57631d5 100644 --- a/build_installer.ps1 +++ b/build_installer.ps1 @@ -150,7 +150,23 @@ VSVersionInfo( if ($LASTEXITCODE -ne 0) { throw "Der Release-Commit ist fehlgeschlagen." } } $sourceCommitted = $true - git push origin main + $pushTarget = "origin" + $tokenPath = @( + (Join-Path $env:LOCALAPPDATA "SyncVito\developer\gitea-token.dpapi"), + (Join-Path $env:LOCALAPPDATA "MusicBrain\developer\gitea-token.dpapi") + ) | Where-Object { Test-Path -LiteralPath $_ -PathType Leaf } | Select-Object -First 1 + if (-not [string]::IsNullOrWhiteSpace($env:GITEA_TOKEN)) { + $pushTarget = "https://Davito:$($env:GITEA_TOKEN.Trim())@gitea.davito.synology.me/Davito/SyncVito.git" + } + elseif ($tokenPath) { + try { + $sec = (Get-Content $tokenPath -Raw).Trim() | ConvertTo-SecureString + $bstr = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($sec) + $t = [Runtime.InteropServices.Marshal]::PtrToStringBSTR($bstr) + $pushTarget = "https://Davito:$t@gitea.davito.synology.me/Davito/SyncVito.git" + } catch { } + } + git push $pushTarget main if ($LASTEXITCODE -ne 0) { throw "Der Quellstand konnte nicht nach Gitea gepusht werden." } }