Erste Version: Tauri-Grundgerüst, WinGet-Anbindung, Selbst-Updater und Release-Skript

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
DavitoandCopilot committed 2026-10-30 15:58:58 +01:00
commit e0773ba299
84 files changed
+12688

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
<#
.SYNOPSIS
Baut VitosUpdater lokal (Installer + portable EXE) ohne Veröffentlichung.
.DESCRIPTION
Führt Frontend-Prüfung und Rust-Prüfungen aus und baut danach mit `cargo tauri build`.
Ergebnis: src-tauri\target\release\bundle\nsis\*-setup.exe sowie src-tauri\target\release\vitos-updater.exe (portabel).
Für signierte Updater-Artefakte muss der Signierschlüssel gesetzt sein (siehe README, Abschnitt "Release").
Für eine Veröffentlichung auf Gitea stattdessen scripts\release.ps1 verwenden.
#>
[CmdletBinding()]
param([switch]$SkipChecks)
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
Set-Location $PSScriptRoot
function Invoke-Native([string]$Description, [scriptblock]$Command) {
& $Command
if ($LASTEXITCODE -ne 0) { throw "$Description ist fehlgeschlagen (Exit-Code $LASTEXITCODE)." }
}
$defaultKey = Join-Path $env:USERPROFILE '.vitosupdater\updater.key'
if (-not $env:TAURI_SIGNING_PRIVATE_KEY -and -not $env:TAURI_SIGNING_PRIVATE_KEY_PATH -and (Test-Path $defaultKey)) {
$env:TAURI_SIGNING_PRIVATE_KEY_PATH = $defaultKey
}
$env:CI = 'true'
if (-not (Test-Path 'node_modules')) { Invoke-Native 'npm install' { npm install } }
if (-not $SkipChecks) {
Write-Host '==> Prüfungen' -ForegroundColor Cyan
Invoke-Native 'svelte-check' { npm run check }
Push-Location 'src-tauri'
try {
Invoke-Native 'cargo clippy' { cargo clippy --all-targets -- -D warnings }
Invoke-Native 'cargo test' { cargo test }
} finally { Pop-Location }
}
Write-Host '==> Bauen (cargo tauri build)' -ForegroundColor Cyan
Invoke-Native 'cargo tauri build' { cargo tauri build }
Write-Host ''
Write-Host 'Fertig. Ergebnisse:' -ForegroundColor Green
Get-ChildItem 'src-tauri\target\release\bundle\nsis' -Filter '*-setup.exe' | ForEach-Object { Write-Host " Installer: $($_.FullName)" }
Write-Host " Portabel: $(Resolve-Path 'src-tauri\target\release\vitos-updater.exe')"