Skip to content

compile: stamp local builds from git describe - #73

Merged
hbrooks merged 1 commit into
mainfrom
fix/dev-build-version-stamp
Jul 23, 2026
Merged

hbrooks merged 1 commit into
mainfrom
fix/dev-build-version-stamp

Conversation

@hbrooks

@hbrooks hbrooks commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

package.json's version field goes stale on main by design — the release workflow rewrites it at tag time and releases since v1.4.0 tag main directly, so a fresh local bun run compile reported 1.3.0 while the latest release was v1.6.0.

  • bun run compile now runs scripts/compile.sh, which stamps the binary via --define BUILD_GIT_VERSION from git describe --tags --always --dirty. A local build reports exactly what it was built from: 1.6.0 on a clean tagged checkout, 1.6.0-1-g72d1edb-dirty one commit past the tag with uncommitted changes.
  • constants.ts prefers the stamp when present; release builds (which run bun build directly after npm version) and tsx dev runs are unchanged.
  • docs/RELEASING.md updated to describe the actual tag-only flow and the dev stamping.

Test plan

  • bun run compile && ./agent --version -> 1.6.0-1-g72d1edb-dirty (correct describe output)
  • tsc --noEmit + vitest run (248) green

package.json's version field goes stale on main by design (the release
workflow rewrites it at tag time), so locally compiled binaries reported
old versions. bun run compile now defines BUILD_GIT_VERSION from
git describe --tags, making ./agent --version report exactly the commit
it was built from; release builds and tsx dev are unchanged. RELEASING.md
updated to describe the tag-only flow that has been practice since v1.4.0.
@hbrooks
hbrooks merged commit 6948f9f into main Jul 23, 2026
1 check 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