feat(learn): pin sync to gemmology-knowledge v1.2.0#34
Merged
Conversation
Replaces the moving git pull from `origin/main` in sync-knowledge.ts with a hard checkout of tag `v1.2.0`, so the deployed site is reproducible from a single content version. The version constant lives in `src/lib/knowledge-version.ts` as the single source of truth, consumed by both the sync script (to drive the checkout) and the /about/sources/ page (to display the version with a link to the corresponding GitHub release). To bump content, update the constant in one place and rerun `npm run sync`.
|
🚀 Preview deployed to: https://d0adb223.gemmology-dev.pages.dev |
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.
Pins the website to a specific gemmology-knowledge release instead of tracking
origin/main.Why
Without a pin, every deploy could ship slightly different content depending on when the knowledge repo was last touched. Tagging the v1.2.0 release (citation infrastructure across all 138 articles, release notes) gives us a stable, reproducible build.
Changes
src/lib/knowledge-version.ts(new) — single source of truth:KNOWLEDGE_VERSION = 'v1.2.0'KNOWLEDGE_REPO_URLandKNOWLEDGE_RELEASE_URLhelpersscripts/sync-knowledge.ts— importsKNOWLEDGE_VERSIONand hard-checks outtags/${KNOWLEDGE_VERSION}aftergit fetch --tags --force. Replaces the priorgit pull origin main.src/pages/about/sources/index.astro— displays "Content version gemmology-knowledge v1.2.0" beneath the<h1>, linking to the GitHub release.Verification
npm run sync— checks outv1.2.0(verified viagit describe --tagsin.cache/gemmology-knowledge)npm run validate:citations— 0 errors, 45 unused-reference warnings (non-blocking)npm run build— 913 pages in 9.12s/about/sources/page renders the version string and release linkBumping later
Edit one constant in
src/lib/knowledge-version.tsand rerunnpm run sync.