compile: stamp local builds from git describe - #73
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 localbun run compilereported1.3.0while the latest release was v1.6.0.bun run compilenow runsscripts/compile.sh, which stamps the binary via--define BUILD_GIT_VERSIONfromgit describe --tags --always --dirty. A local build reports exactly what it was built from:1.6.0on a clean tagged checkout,1.6.0-1-g72d1edb-dirtyone commit past the tag with uncommitted changes.constants.tsprefers the stamp when present; release builds (which runbun builddirectly afternpm version) and tsx dev runs are unchanged.docs/RELEASING.mdupdated 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