Release 3.8.2.4: unify Windows/macOS GUI on glaze HTTP host.
ci / test (macos-latest) (push) Waiting to run
ci / test (ubuntu-latest) (push) Waiting to run
ci / test (windows-latest) (push) Waiting to run

Auto-bump build number on each compile; ship versioned Windows artifacts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
M4
2026-08-01 16:01:25 +03:00
co-authored by Cursor
parent d1570b23d3
commit 464a61aebf
26 changed files with 406 additions and 256 deletions
+59
View File
@@ -0,0 +1,59 @@
# Increment BuildNumber in update.go and sync version artifacts (no Python required).
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $PSScriptRoot
$updateGo = Join-Path $Root "internal\update\update.go"
$text = [IO.File]::ReadAllText($updateGo)
$m = [regex]::Match($text, 'const BuildNumber\s*=\s*(\d+)')
if (-not $m.Success) { throw "cannot find BuildNumber in update.go" }
$old = [int]$m.Groups[1].Value
$new = $old + 1
$text2 = [regex]::Replace($text, 'const BuildNumber\s*=\s*\d+', "const BuildNumber = $new", 1)
[IO.File]::WriteAllText($updateGo, $text2)
Write-Host "BuildNumber: $old -> $new"
$verM = [regex]::Match($text2, 'CurrentVersion\s*=\s*"([^"]+)"')
if (-not $verM.Success) { throw "cannot find CurrentVersion" }
$ver = $verM.Groups[1].Value
$parts = @($ver.Split('.') | ForEach-Object { [int]$_ })
while ($parts.Count -lt 3) { $parts += 0 }
$major, $minor, $patch = $parts[0], $parts[1], $parts[2]
$full = "$ver.$new"
$display = "$ver+$new"
$versionCode = $major * 1000000 + $minor * 10000 + $patch * 100 + $new
$viPath = Join-Path $Root "versioninfo.json"
$vi = [IO.File]::ReadAllText($viPath)
$vi = [regex]::Replace($vi, '("FileVersion"\s*:\s*\{\s*"Major"\s*:\s*)\d+', "`${1}$major", 1)
$vi = [regex]::Replace($vi, '("Minor"\s*:\s*)\d+(\s*,\s*"Patch")', "`${1}$minor`${2}", 1)
$vi = [regex]::Replace($vi, '("Patch"\s*:\s*)\d+(\s*,\s*"Build")', "`${1}$patch`${2}", 1)
$vi = [regex]::Replace($vi, '("Build"\s*:\s*)\d+', "`${1}$new", 2)
$vi = [regex]::Replace($vi, '("FileVersion"\s*:\s*")\d+\.\d+\.\d+\.\d+(")', "`${1}$full`${2}")
$vi = [regex]::Replace($vi, '("ProductVersion"\s*:\s*")\d+\.\d+\.\d+\.\d+(")', "`${1}$full`${2}")
[IO.File]::WriteAllText($viPath, $vi)
Write-Host "updated versioninfo.json -> $full"
$batPath = Join-Path $Root "build-macos.bat"
$bat = [IO.File]::ReadAllText($batPath)
$bat2 = [regex]::Replace(
$bat,
'-version\s+\d+\.\d+\.\d+\s+-build\s+\d+\.\d+\.\d+\.\d+',
"-version $ver -build $full"
)
if ($bat2 -ne $bat) {
[IO.File]::WriteAllText($batPath, $bat2)
Write-Host "updated build-macos.bat -> $ver $full"
}
$gradlePath = Join-Path $Root "android\app\build.gradle.kts"
if (Test-Path $gradlePath) {
$g = [IO.File]::ReadAllText($gradlePath)
$g2 = [regex]::Replace($g, 'versionCode\s*=\s*[\d_]+', "versionCode = $versionCode")
$g2 = [regex]::Replace($g2, 'versionName\s*=\s*"[^"]+"', "versionName = `"$display`"")
if ($g2 -ne $g) {
[IO.File]::WriteAllText($gradlePath, $g2)
Write-Host "updated android gradle -> $display $versionCode"
}
}
Write-Host "bump complete: $full"