Automate patch release versions and standardize Linux deb packages

This commit is contained in:
tongtong committed 2026-11-13 12:01:35 +08:00
1 parent 0d269f3ded
commit 69a951f6d0
5 files changed
+67 -10

No files matched your search

+11 -3
View File
@@ -1,7 +1,8 @@
param(
[ValidateSet('All','Avalonia','Flutter')][string]$Edition='All',
[string]$Compiler,
[switch]$SkipBuild
[switch]$SkipBuild,
[switch]$ReuseVersion
)
$ErrorActionPreference='Stop'
$root=Split-Path $PSScriptRoot -Parent
@@ -10,8 +11,15 @@ if (-not $Compiler) {
$Compiler=$candidates | Where-Object { Test-Path -LiteralPath $_ } | Select-Object -First 1
}
if (-not $Compiler) { throw 'Install Inno Setup 6/7 or specify -Compiler path/to/ISCC.exe' }
$version=[regex]::Match((Get-Content (Join-Path $root 'Cargo.toml') -Raw),'(?m)^version = "([0-9.]+)"').Groups[1].Value
if (-not $version) { throw 'Workspace version missing' }
if ($SkipBuild -and -not $ReuseVersion) { throw 'SkipBuild requires ReuseVersion; new releases must rebuild their binaries' }
$versionArgs=@((Join-Path $PSScriptRoot 'release-version.py'))
if ($ReuseVersion) { $versionArgs+='--reuse' }
$version=(& python @versionArgs).Trim()
if ($LASTEXITCODE) { throw 'Release version update failed' }
if (-not $SkipBuild) {
& (Join-Path $PSScriptRoot 'build.ps1')
if ($LASTEXITCODE) { throw 'Backend build failed' }
}
$output=Join-Path $root 'bin/installers'
New-Item -ItemType Directory -Force -Path $output | Out-Null
foreach ($name in @('Avalonia','Flutter')) {