build: keep runtime VERSION literal in sync with the release#38
Merged
Conversation
v2.1.0 shipped logging "Initialized KyteJS v2.0.2" because the static VERSION literal in kyte-source.js was never bumped — release-please updated package.json + the manifest but not the JS literal, and the deploy builds straight from source. Three layers so it can't drift again: 1. x-release-please-version annotation on the VERSION line + extra-files in release-please-config.json -> release-please bumps the literal in the release PR, keeping committed source correct. 2. deploy.yml force-stamps the literal from the git tag at build time (single source of truth = tag, same as the copyright header) and fails the build if the stamp didn't take. 3. Bumped the current literal to 2.1.0 to match the live release. The shipped CDN bundle now always reports the tag version. Co-Authored-By: Claude Opus 4.8 (1M context) <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.
Problem
v2.1.0 shipped logging
Initialized KyteJS v2.0.2— thestatic VERSIONliteral inkyte-source.jswas never bumped. release-please updatespackage.json+ the manifest but not the JS literal, anddeploy.ymlbuilds straight from source, so the stale literal rode to the CDN.Fix (three layers, defense in depth)
x-release-please-versionannotation on theVERSIONline +extra-filesinrelease-please-config.json→ release-please now bumps the literal in the release PR, keeping committed source correct.deploy.ymlforce-stamps the literal from the git tag at build time (single source of truth = the tag, same as the copyright header already does) and fails the build if the stamp didn't take.2.1.0to match the live release.Net: the shipped CDN bundle can never again report a version different from its tag.
Note
This does not re-deploy the CDN. The live v2.1.0 file keeps logging "2.0.2" until the next tag push (or a manual re-push of v2.1.0, which would now stamp correctly). Cosmetic only — the code is correct.
🤖 Generated with Claude Code