update
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
================================================================
|
||||
BACKUP: backup_hotfix_license_startblocker_release_20260528_144515
|
||||
================================================================
|
||||
|
||||
Erstellt: 2026-05-28 14:45:15 Lokalzeit (Europe/Zurich)
|
||||
Anlass: Hotfix-Release v1.2.9 — Lizenz-Startblocker-Fix
|
||||
|
||||
INHALT DIESES RELEASES:
|
||||
Einzige Code-Aenderung: _show_activation_dialog() in basis14.py
|
||||
- dlg.grab_set() hinzugefuegt (verhindert Focus-Diebstahl durch topmost)
|
||||
- key_entry.focus_set() (Entry-Feld sofort tippbar)
|
||||
- _demo_continue() Funktion (sauber via dlg.grab_release + lift + focus)
|
||||
- WM_DELETE_WINDOW -> _demo_continue
|
||||
- Buttons: "Lizenz aktivieren" | "Demo-Modus starten" | "Spaeter"
|
||||
- _close_after_activate() nach erfolgreicher Aktivierung
|
||||
Version: 1.2.8 -> 1.2.9
|
||||
|
||||
GESICHERTE DATEIEN:
|
||||
basis14.py (mit Fix, v1.2.9)
|
||||
aza_version.py (1.2.9)
|
||||
version.json (alter Stand vor Build)
|
||||
publish_update.ps1
|
||||
build_release_manifest.ps1
|
||||
|
||||
ROLLBACK:
|
||||
$b = ".\backup_hotfix_license_startblocker_release_20260528_144515"
|
||||
Copy-Item "$b\basis14.py" ".\basis14.py" -Force
|
||||
Copy-Item "$b\aza_version.py" ".\aza_version.py" -Force
|
||||
Copy-Item "$b\version.json" ".\version.json" -Force
|
||||
Copy-Item "$b\publish_update.ps1" ".\publish_update.ps1" -Force
|
||||
# Danach Server-Rollback:
|
||||
# ssh root@178.104.51.177
|
||||
# cp /root/backups/pre_release_129_<TS>/aza_desktop_setup.exe \
|
||||
# /root/aza-app/release/downloads/aza_desktop_setup.exe
|
||||
# cp /root/backups/pre_release_129_<TS>/version.json \
|
||||
# /root/aza-app/release/version.json
|
||||
|
||||
================================================================
|
||||
@@ -0,0 +1,2 @@
|
||||
APP_VERSION = "1.2.9"
|
||||
APP_CHANNEL = "stable"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,97 @@
|
||||
$projectRoot = $PSScriptRoot
|
||||
$azaVersionPy = Join-Path $projectRoot "aza_version.py"
|
||||
$manifestPath = Join-Path $projectRoot "release\version.json"
|
||||
$releaseBaseUrl = $env:AZA_RELEASE_BASE_URL
|
||||
$installerPath = Join-Path $projectRoot "dist\installer\aza_desktop_setup.exe"
|
||||
|
||||
if (-not (Test-Path $azaVersionPy)) {
|
||||
Write-Error "aza_version.py nicht gefunden: $azaVersionPy"
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Erzeuge release/version.json aus aza_version.py..."
|
||||
|
||||
$versionContent = Get-Content $azaVersionPy -Raw
|
||||
if ($versionContent -match 'APP_VERSION\s*=\s*"([^"]+)"') {
|
||||
$appVersion = $matches[1].Trim()
|
||||
} else {
|
||||
Write-Error "APP_VERSION nicht in aza_version.py gefunden."
|
||||
exit 1
|
||||
}
|
||||
if ($versionContent -match 'APP_CHANNEL\s*=\s*"([^"]+)"') {
|
||||
$appChannel = $matches[1].Trim()
|
||||
} else {
|
||||
Write-Error "APP_CHANNEL nicht in aza_version.py gefunden."
|
||||
exit 1
|
||||
}
|
||||
|
||||
$manifest = @{}
|
||||
if (Test-Path $manifestPath) {
|
||||
$manifest = Get-Content $manifestPath -Raw | ConvertFrom-Json
|
||||
}
|
||||
|
||||
$releaseDate = if ($manifest.release_date) { $manifest.release_date } else { (Get-Date).ToString("yyyy-MM-dd") }
|
||||
$minVersion = if ($manifest.minimum_supported_version) { $manifest.minimum_supported_version } else { $appVersion }
|
||||
$minRequired = if ($manifest.min_required_version) { $manifest.min_required_version } else { $minVersion }
|
||||
$downloadUrl = if ($releaseBaseUrl) {
|
||||
"$releaseBaseUrl/aza_desktop_setup.exe"
|
||||
} elseif ($manifest.download_url) {
|
||||
$manifest.download_url
|
||||
} else {
|
||||
"https://api.aza-medwork.ch/downloads/aza_desktop_setup.exe"
|
||||
}
|
||||
$installerType = if ($manifest.installer_type) { $manifest.installer_type } else { "inno-setup" }
|
||||
$notesExisting = @()
|
||||
if ($manifest.notes -and $manifest.notes.Length -gt 0) {
|
||||
$notesExisting = @($manifest.notes)
|
||||
} elseif ($manifest.release_notes -and $manifest.release_notes.Length -gt 0) {
|
||||
$notesExisting = @($manifest.release_notes)
|
||||
}
|
||||
$notesList = if ($notesExisting.Count -gt 0) { $notesExisting } else { @("Desktop-Build aktualisiert") }
|
||||
$updateLevel = if ($manifest.update_level) { $manifest.update_level.ToString().ToLowerInvariant() } else { "recommended" }
|
||||
if ($updateLevel -ne "optional" -and $updateLevel -ne "recommended" -and $updateLevel -ne "required") {
|
||||
$updateLevel = "recommended"
|
||||
}
|
||||
|
||||
$buildStamp = (Get-Date).ToString("yyyyMMdd_HHmmss")
|
||||
$sha256Hex = $null
|
||||
if (Test-Path $installerPath) {
|
||||
$buildStamp = (Get-Item $installerPath).LastWriteTime.ToString("yyyyMMdd_HHmmss")
|
||||
$sha256Hex = (Get-FileHash -Path $installerPath -Algorithm SHA256).Hash
|
||||
} elseif ($manifest.build) {
|
||||
$buildStamp = $manifest.build.ToString()
|
||||
}
|
||||
if (-not $sha256Hex -and $manifest.sha256) {
|
||||
$sha256Hex = $manifest.sha256.ToString()
|
||||
}
|
||||
|
||||
$newManifest = [ordered]@{
|
||||
version = $appVersion
|
||||
build = $buildStamp
|
||||
channel = $appChannel
|
||||
release_date = $releaseDate
|
||||
minimum_supported_version = $minVersion
|
||||
min_required_version = $minRequired
|
||||
download_url = $downloadUrl
|
||||
sha256 = $sha256Hex
|
||||
update_level = $updateLevel
|
||||
installer_type = $installerType
|
||||
notes = $notesList
|
||||
release_notes = $notesList
|
||||
}
|
||||
|
||||
$newManifest | ConvertTo-Json -Depth 6 | Set-Content $manifestPath -Encoding UTF8
|
||||
|
||||
if (-not $appVersion) {
|
||||
Write-Error "release/version.json konnte nicht erzeugt werden."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "release/version.json aktualisiert."
|
||||
Write-Host "Version: $appVersion Build: $buildStamp"
|
||||
if ($sha256Hex) {
|
||||
Write-Host "SHA256: $sha256Hex"
|
||||
}
|
||||
if ($releaseBaseUrl) {
|
||||
Write-Host "Download-URL Base: $releaseBaseUrl"
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
# publish_update.ps1 - Upload Installer + Manifest nach Hetzner
|
||||
# Laedt in release/ UND release/downloads/ hoch (beide Pfade).
|
||||
|
||||
$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
|
||||
}
|
||||
Write-Host " release/ OK"
|
||||
|
||||
# In den oeffentlichen Downloads-Ordner kopieren
|
||||
# (https://api.aza-medwork.ch/downloads/aza_desktop_setup.exe)
|
||||
ssh $remoteHost "cp ${remotePath}/aza_desktop_setup.exe ${remoteDownloadsPath}/aza_desktop_setup.exe"
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Warning "Warnung: Kopieren in downloads/ fehlgeschlagen."
|
||||
} else {
|
||||
Write-Host " release/downloads/ OK"
|
||||
}
|
||||
|
||||
# --- [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
|
||||
}
|
||||
Write-Host " version.json OK"
|
||||
|
||||
# --- [4/4] ---
|
||||
Write-Host "[4/4] Remote-Verifizierung (Groesse + SHA256-Abgleich)..."
|
||||
ssh $remoteHost "ls -lh ${remotePath}/aza_desktop_setup.exe && ls -lh ${remoteDownloadsPath}/aza_desktop_setup.exe && ls -lh ${remotePath}/version.json"
|
||||
|
||||
Write-Host ""
|
||||
Write-Host " SHA256-Vergleich (release/ vs. downloads/)..."
|
||||
$hashOutput = ssh $remoteHost "sha256sum ${remotePath}/aza_desktop_setup.exe ${remoteDownloadsPath}/aza_desktop_setup.exe 2>/dev/null"
|
||||
Write-Host $hashOutput
|
||||
|
||||
$hashes = $hashOutput -split "`n" | Where-Object { $_ -match "^[0-9a-f]{64}" } | ForEach-Object { ($_ -split "\s+")[0] }
|
||||
if ($hashes.Count -eq 2 -and $hashes[0] -eq $hashes[1]) {
|
||||
Write-Host " SHA256 identisch: beide Pfade OK." -ForegroundColor Green
|
||||
} elseif ($hashes.Count -lt 2) {
|
||||
Write-Warning " SHA256 konnte nicht verglichen werden (Dateien fehlen?)."
|
||||
} else {
|
||||
Write-Error "WARNUNG: SHA256 der oeffentlichen URL weicht ab! release/downloads/ wurde moeglicherweise nicht aktualisiert."
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
ssh $remoteHost "curl -sI https://api.aza-medwork.ch/downloads/aza_desktop_setup.exe | head -4"
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "UPLOAD FERTIG"
|
||||
Write-Host ""
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": "1.2.8",
|
||||
"build": "20260525_225050",
|
||||
"channel": "stable",
|
||||
"app": "AZA Desktop"
|
||||
}
|
||||
Reference in New Issue
Block a user