Skip to content

Make the Windows build work headlessly; add signing + one-command release - #3

Merged
jochenhz merged 1 commit into
mainfrom
windows-headless-build-signing
May 29, 2026
Merged

Make the Windows build work headlessly; add signing + one-command release#3
jochenhz merged 1 commit into
mainfrom
windows-headless-build-signing

Conversation

@jochenhz

Copy link
Copy Markdown
Contributor

What

Make the git-dist Windows build run on a clean/headless host, bundle the missing
less pager, add SimplySign code-signing, and reduce the whole release to one
command. These are the exact changes used to build and publish
v2.54.0.anchorpoint.1
— without them, a fresh clone can't reproduce that build.

Why

build.py assumed an already-warm, interactive SDK. On a clean host it failed at:
the detached git-bash.exe launcher (the compile silently no-op'd), empty
TMP/TEMP (the MinGW toolchain wrote to C:\Windows), GIT_EDITOR=true (broke
MinGit release.sh), an uncreated MinGit output dir, .exe server binaries
slipping past pruning, a CRLF .sha256, an uninitialized SDK source, and a
missing pager.

Changes

build.py

  • _sdk_bash: synchronous bash.exe -lc + streamed output; writable TMP/TEMP; drop GIT_EDITOR/EDITOR/VISUAL.
  • ensure_sdk_sources: auto fetch + checkout usr/src/git + usr/src/build-extra.
  • create the MinGit --output dir; prune .exe variants; LF-only .sha256.
  • bundle_less: ship less.exe + msys-pcre2-8-0.dll + terminfo.
  • sign(): default to ./sign-windows.ps1; read [windows].sign_thumbprint.

New

  • sign-windows.ps1 — sign .exe/.dll via signtool using the SimplySign cert, SHA-256, Certum RFC3161 timestamp.
  • release.ps1 — verify the SimplySign cert is mounted, then run build.py (default --package --publish).

Docs — README one-time setup + the single command; config.example.ini [windows] section.

One command, going forward

# with SimplySign Desktop logged in
.\release.ps1            # == python build.py --package --publish

Verified

  • Full signed build: 186/186 binaries Authenticode-signed (Anchorpoint Software GmbH) + Certum-timestamped; sha256sum -c passes.
  • Published v2.54.0.anchorpoint.1 (Windows asset) from this tooling.
  • ensure_sdk_sources is a no-op on an already-inited SDK; release.ps1 cert precheck + passthrough smoke-tested.

🤖 Generated with Claude Code

…ease

build.py assumed a warm, interactive SDK; on a clean/headless host the Windows
build failed in several ways. Fix them and add the missing pieces so the whole
release is one command: release.ps1 (or `python build.py --package --publish`)
builds, bundles, signs, packages, and publishes.

build.py:
- _sdk_bash: run the Git compile + MinGit steps via bash.exe -lc (synchronous,
  output streamed) instead of the detached git-bash.exe launcher; export a
  writable TMP/TEMP inside the build shell (headless shells have none, so the
  MinGW toolchain fell back to C:\Windows and failed); drop inherited
  GIT_EDITOR/EDITOR/VISUAL (GIT_EDITOR=true defeated MinGit release.sh).
- ensure_sdk_sources: auto fetch + checkout usr/src/git and usr/src/build-extra
  on first build (no manual `sdk init`).
- create the MinGit --output dir before release.sh runs.
- prune_programs: also remove .exe variants (git-upload-pack.exe etc. were
  shipping on Windows).
- package: write the .sha256 LF-only so `sha256sum -c` works for consumers.
- bundle_less: ship less.exe + msys-pcre2-8-0.dll + terminfo (MinGit omits the
  pager); git defaults to less, apps pass `git -P` for captured output.
- sign(): default WINDOWS_SIGN_SCRIPT to ./sign-windows.ps1; read
  [windows].sign_thumbprint from config.ini into the signing env.

New files:
- sign-windows.ps1: sign the dist's .exe/.dll via signtool using the SimplySign
  cloud cert (selected by thumbprint), SHA-256, RFC3161-timestamped at Certum.
- release.ps1: verify the SimplySign cert is mounted, then run build.py
  (default --package --publish).

Docs:
- README: one-time host setup + the single-command release; drop the stale
  "anchorpoint MinGit flavor" prerequisite (it is just a version label).
- config.example.ini: document the [windows] signing section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jochenhz
jochenhz merged commit ca83b1e into main May 29, 2026
1 of 4 checks passed
jochenhz added a commit that referenced this pull request May 29, 2026
…d-signing

Make the Windows build work headlessly; add signing + one-command release
@jochenhz
jochenhz deleted the windows-headless-build-signing branch May 29, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant