This commit is contained in:
2026-05-28 18:58:38 +02:00
parent 641bb10479
commit 28f429885a
4950 changed files with 933414 additions and 666 deletions

View File

@@ -0,0 +1,55 @@
# publish_update.ps1 Upload Installer + Manifest nach Hetzner
$ErrorActionPreference = "Stop"
$projectRoot = $PSScriptRoot
$remoteHost = "root@178.104.51.177"
$remotePath = "/root/aza-app/release"
$remoteDownloadsPath = "/root/aza-app/release/downloads"
$installerPath = Join-Path $projectRoot "dist\installer\aza_desktop_setup.exe"
$manifestPath = Join-Path $projectRoot "release\version.json"
Write-Host ""
# --- [1/4] ---
Write-Host "[1/4] Lokale Dateien pruefen..."
if (-not (Test-Path $installerPath)) {
Write-Error "ABBRUCH: $installerPath nicht gefunden."
exit 1
}
$sizeMB = [math]::Round((Get-Item $installerPath).Length / 1MB, 2)
Write-Host " Installer OK ($sizeMB MB)"
if (-not (Test-Path $manifestPath)) {
Write-Error "ABBRUCH: $manifestPath nicht gefunden."
exit 1
}
Write-Host " version.json OK"
# --- [2/4] ---
Write-Host "[2/4] Installer hochladen (release/ UND release/downloads/)..."
scp "$installerPath" "${remoteHost}:${remotePath}/aza_desktop_setup.exe"
if ($LASTEXITCODE -ne 0) {
Write-Error "ABBRUCH: Installer-Upload fehlgeschlagen."
exit 1
}
# Auch direkt in den oeffentlichen Downloads-Ordner kopieren (wird von
# https://api.aza-medwork.ch/downloads/aza_desktop_setup.exe ausgeliefert)
ssh $remoteHost "cp ${remotePath}/aza_desktop_setup.exe ${remoteDownloadsPath}/aza_desktop_setup.exe && echo ' Downloads-Ordner aktualisiert'"
if ($LASTEXITCODE -ne 0) {
Write-Warning "Warnung: Kopieren in downloads/ fehlgeschlagen bitte manuell pruefen."
}
# --- [3/4] ---
Write-Host "[3/4] Manifest hochladen..."
scp "$manifestPath" "${remoteHost}:${remotePath}/version.json"
if ($LASTEXITCODE -ne 0) {
Write-Error "ABBRUCH: Manifest-Upload fehlgeschlagen."
exit 1
}
# --- [4/4] ---
Write-Host "[4/4] Remote-Verifizierung..."
ssh $remoteHost "ls -lh ${remotePath}/aza_desktop_setup.exe; ls -lh ${remoteDownloadsPath}/aza_desktop_setup.exe; ls -lh ${remotePath}/version.json; echo '---'; curl -sI https://api.aza-medwork.ch/downloads/aza_desktop_setup.exe | head -3; echo '---'; curl -sI https://api.aza-medwork.ch/download/version.json | head -3"
Write-Host ""
Write-Host "UPLOAD FERTIG"
Write-Host ""