Skip to content

chore(installer): stamp the real release version into installer artifacts - #3105

Merged
benjaminshafii merged 1 commit into
devfrom
chore/installer-version
Jul 25, 2026
Merged

chore(installer): stamp the real release version into installer artifacts#3105
benjaminshafii merged 1 commit into
devfrom
chore/installer-version

Conversation

@benjaminshafii

Copy link
Copy Markdown
Member

The installer shipped as an unversioned artifact: apps/installer/package.json was pinned at 0.1.0, the macOS bundle hardcoded CFBundleShortVersionString 1.0.0, the Windows .exe carried no version resource, and nothing in the UI or on the binary told you which build you had. That makes support ("which installer are you running?") guesswork.

What changed

  • One source of truth for the stamped version: apps/installer/scripts/installer-version.mjs. Precedence is explicit flag/env, then the release tag, then the committed package.json — so a developer build never claims to be a release.
  • The release workflow resolves it from the tag and stamps it everywhere: bun build --define for the runtime constant, the signed macOS Info.plist (both CFBundleShortVersionString and CFBundleVersion), a Windows version resource plus title/publisher/description on the .exe, and the DMG volume name.
  • CI asserts the stamp took. The compiled binary is run with --version and the build fails if it does not report openwork-installer <version>, so a silently unstamped artifact cannot ship.
  • The installer UI shows the build in a fixed footer line, positioned so it never shifts the primary action.
  • bump-version.mjs now bumps apps/installer/package.json alongside the other packages and includes it in the release commit, so the fallback stays truthful.

Asset filenames are deliberately unchanged

The published names stay OpenWork-Installer-mac-arm64.dmg / -mac-x64.dmg / -win-x64.exe. den-api's genericInstallerArtifactName() resolves download links by those stable names, and the org install guide in den-web now shows the exact filename to the user, so putting a version in the filename would break both. The version lives inside the artifact instead, where it is signed and inspectable.

Testing

  • bun test in apps/installer — 52 pass, 0 fail
  • Resolver sanity-checked directly: --release-tag v0.19.00.19.0, with --windows0.19.0.0, and no tag → 0.18.1 from package.json

Not verified locally: the macOS signing/notarization and Windows resource-stamping paths only run in CI with release credentials, so the end-to-end stamp needs a release build to confirm. The --version assertion in the workflow is what guards it.

Made with Cursor

The installer artifact shipped in v0.18.1 reported 1.0.0 because the mac
Info.plist hardcoded it and nothing else carried a version at all, so a
user or support engineer could not tell which build they had.

- resolve one version from the release tag (local builds fall back to
  apps/installer/package.json) and stamp it into the compiled binary,
  the mac Info.plist, the DMG volume name, and the Windows version
  resource
- add `--version` to the installer CLI and a quiet footer in the window
- keep apps/installer/package.json on the release train via bump-version

Published asset filenames are unchanged.
@benjaminshafii
benjaminshafii merged commit 8f3e837 into dev Jul 25, 2026
16 checks passed
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