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
+66 -6
View File
@@ -1,7 +1,24 @@
@echo off
setlocal
setlocal EnableExtensions
cd /d "%~dp0"
echo Bumping build number...
call :bump_build
if errorlevel 1 exit /b 1
REM Full version = CurrentVersion.BuildNumber from versioninfo.json (e.g. 3.8.2.4)
set "VER="
for /f "usebackq delims=" %%v in (`powershell -NoProfile -Command "(Get-Content -Raw 'versioninfo.json' | ConvertFrom-Json).StringFileInfo.FileVersion"`) do set "VER=%%v"
if not defined VER (
echo Failed to read FileVersion from versioninfo.json
exit /b 1
)
set "OUT_GUI=Navis-%VER%.exe"
set "OUT_CLI=vpnclient-%VER%.exe"
set "DIST=dist\navis-release"
echo Building Navis %VER% for Windows...
echo Generating Windows icon resources...
go run ./tools/mkico
if errorlevel 1 exit /b 1
@@ -14,16 +31,59 @@ if errorlevel 1 (
goversioninfo -64 -icon assets\navis.ico -manifest assets\app.manifest -o cmd\vpnapp\resource.syso versioninfo.json
if errorlevel 1 exit /b 1
echo Building Navis GUI and CLI...
go build -ldflags="-H windowsgui -s -w" -trimpath -o Navis.exe ./cmd/vpnapp
echo Building GUI -^> %OUT_GUI%
go build -ldflags="-H windowsgui -s -w" -trimpath -o "%OUT_GUI%" ./cmd/vpnapp
if errorlevel 1 exit /b 1
go build -ldflags="-s -w" -trimpath -o vpnclient.exe ./cmd/vpnclient
echo Building CLI -^> %OUT_CLI%
go build -ldflags="-s -w" -trimpath -o "%OUT_CLI%" ./cmd/vpnclient
if errorlevel 1 exit /b 1
mkdir "%DIST%" 2>nul
copy /Y "%OUT_GUI%" "%DIST%\%OUT_GUI%" >nul
if errorlevel 1 exit /b 1
copy /Y "%OUT_CLI%" "%DIST%\%OUT_CLI%" >nul
if errorlevel 1 exit /b 1
REM Stable names for the update feed / installers (best-effort if file is locked)
call :copy_alias "%OUT_GUI%" "%DIST%\Navis.exe"
call :copy_alias "%OUT_CLI%" "%DIST%\vpnclient.exe"
echo.
echo Done:
echo Navis.exe
echo vpnclient.exe
echo %OUT_GUI%
echo %OUT_CLI%
echo %DIST%\%OUT_GUI%
echo %DIST%\%OUT_CLI%
echo %DIST%\Navis.exe (update alias)
echo assets\navis.ico
endlocal
exit /b 0
:bump_build
where py >nul 2>&1
if not errorlevel 1 (
py -3 scripts\bump-build.py
exit /b %ERRORLEVEL%
)
where python >nul 2>&1
if not errorlevel 1 (
python scripts\bump-build.py
exit /b %ERRORLEVEL%
)
where python3 >nul 2>&1
if not errorlevel 1 (
python3 scripts\bump-build.py
exit /b %ERRORLEVEL%
)
REM PowerShell fallback when Python is not installed
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\bump-build.ps1"
exit /b %ERRORLEVEL%
:copy_alias
if exist "%~2" del /F /Q "%~2" >nul 2>&1
copy /Y "%~1" "%~2" >nul 2>&1
if errorlevel 1 (
echo Warning: could not refresh %~2 ^(file in use^). Versioned build is still ready.
exit /b 0
)
exit /b 0