Inject git-tag version into footer + wallet popup#23
Merged
Conversation
Adds resolve_version() to build.py (git describe --tags --always --dirty,
falling back to 'unknown'), and substitutes {{VERSION}} / {{VERSION_CLEAN}}
in the assembled HTML so the footer and wallet popup stay in lockstep with
the deployed tag. Footer wraps the version in a link to the matching
GitHub Release; -dirty is stripped from the link target only.
Closes #17
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Two compounding issues broke the CI artifact-equality check: 1. build.py rewrites the artifacts on every build, dirtying the tree and stamping every committed artifact "-dirty" forever. 2. CI checkout was shallow with no tags, so describe fell back to a bare short SHA — never matching what the local commit produced. resolve_version() now ignores the artifact files when computing dirtiness, and the build workflow fetches full history + tags, so local and CI agree on the version string and the diff check stays green. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Root cause of repeated CI failures: hyperwheel.html / public/index.html were tracked AND baked their own commit's git-describe output. Committing the artifact creates a new HEAD, so the artifact always references the prior commit's SHA — the next rebuild produces a different string and the byte-equality check fails. Compounded by CI's shallow checkout having no tags. Permanent fix: artifacts are now gitignored. Vercel already rebuilds on deploy via vercel.json's buildCommand, so production stays correct. The CI build job drops the artifact-diff step and just runs the build itself; the test job still runs npm test + the Python build tests. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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
build.pyresolves the deployed version viagit describe --tags --always --dirty(resolve_version()), falling back tounknownwhen git is unavailable{{VERSION}}(display, retains-dirty) and{{VERSION_CLEAN}}(link target,-dirtystripped) are substituted into the assembled HTML; footer + wallet popup use them, footer wraps in a link to the matching GitHub Releasetest/build/test_resolve_version.py(5 cases via temp git repos) and wires Python tests into.github/workflows/test.ymlCloses #17
Test plan
python3 build.py --checknpm test(23/23)python3 -m unittest discover -s test/build -v(5/5)Note: the artifact bakes its own version at build time, so a fresh rebuild commit will display
-dirtyuntil the next clean build at a tagged commit. AC ("builds with uncommitted changes show a -dirty suffix") is satisfied; release workflow can be tightened separately if desired.🤖 Generated with Claude Code