fix(installer): derive installer version from the git tag, not a hardcoded default

installer.iss had #define MyAppVersion "2.1.0", so every release's setup.exe
(and its AppVersion/VersionInfoVersion) self-identified as 2.1.0 regardless of
the actual tag. setup-build-env.ps1 now passes /DMyAppVersion derived from
GITHUB_REF_NAME (CI tag run) or git describe, falling back to a 0.0.0-dev
placeholder in the .iss only for bare manual compiles.
This commit is contained in:
2026-08-10 17:40:35 -07:00
parent 52eba72613
commit 1b332cacab
2 changed files with 22 additions and 5 deletions
+7 -3
View File
@@ -5,10 +5,14 @@
; runtime. Nothing on the target machine requires internet access.
;
; Usage:
; iscc installer\windows\installer.iss
; theta-agent-2.1.0-windows-amd64-setup.exe /SILENT ^
; iscc "/DMyAppVersion=2.2.0" installer\windows\installer.iss
; theta-agent-2.2.0-windows-amd64-setup.exe /SILENT ^
; /SERVER_URL=https://sso.example.com /JOIN_KEY=tjk_...
;
; The version is passed in by scripts/setup-build-env.ps1 (derived from the
; git tag). The default below exists only so a bare `iscc installer.iss` call
; still compiles; it should never be the version in a real build.
;
; Interactively, a wizard page asks for the Theta Directory URL and a join key
; (with a button that opens the Theta Directory's Directory -> Install Agent page
; to mint one). In silent mode, /SERVER_URL, /JOIN_KEY, /AUTH_TOKEN, /PUBLIC_KEY
@@ -16,7 +20,7 @@
; are written into agent.yml so the installed service enrolls on first start.
#ifndef MyAppVersion
#define MyAppVersion "2.1.0"
#define MyAppVersion "0.0.0-dev"
#endif
#define MyAppName "Theta Agent"