Add post-tag-version-bump to freeze default_version after a release - #95
Draft
jnasbyupgrade wants to merge 1 commit into
Draft
Add post-tag-version-bump to freeze default_version after a release#95jnasbyupgrade wants to merge 1 commit into
jnasbyupgrade wants to merge 1 commit into
Conversation
Committing versioned SQL files (sql/{ext}--{version}.sql) means ongoing
development after a release can silently regenerate and overwrite the file
that was just released, since `make` always regenerates whatever file
matches the current default_version. New target `post-tag-version-bump`
bumps each extension's default_version to a placeholder alias (`stable` by
default) via the new `bump-default-version.sh` script, so a subsequent
`make` freezes the released file instead of overwriting it.
Deliberately a separate, explicit step rather than wired into `tag`/`dist`:
both of those run routinely outside of an actual release (including from
this project's own test suite), and `dist` is documented/tested to leave
the repository clean -- auto-bumping on every such run would both break
that guarantee and risk bumping default_version on a version nobody meant
to release yet.
Controlled via two new variables, following the existing
PGXNTOOL_ENABLE_*/PGXNTOOL_* override pattern:
- PGXNTOOL_ENABLE_POST_TAG_VERSION_BUMP (default yes) makes the target a
no-op when set to no
- PGXNTOOL_POST_TAG_VERSION (default stable) controls the placeholder value
_.gitignore now ignores sql/*--stable.sql to match the default placeholder.
Fixes Postgres-Extensions#20.
Related changes in pgxntool-test:
- Add test/standard/tag-version-bump.bats: standalone script-logic coverage
for bump-default-version.sh, plus make -n dry-run and stub-based coverage
of post-tag-version-bump's wiring, and a real end-to-end smoke test
- Add pgxntool/bump-default-version.sh to the exact distribution-contents
manifest (test/lib/dist-expected-files.txt)
Co-Authored-By: Claude <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Draft
2 tasks
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
make post-tag-version-bump, which bumps each extension'sdefault_versionto a placeholder alias (stableby default, via the newbump-default-version.shscript) so ongoing development after a release doesn't silently regenerate and overwrite the just-released version's SQL file.tag/dist, since both of those run routinely outside of an actual release (including in this project's own test suite) anddistis documented/tested to leave the repository clean.PGXNTOOL_ENABLE_*/PGXNTOOL_*pattern:PGXNTOOL_ENABLE_POST_TAG_VERSION_BUMP(defaultyes) andPGXNTOOL_POST_TAG_VERSION(defaultstable)._.gitignorenow ignoressql/*--stable.sqlto match the default placeholder.Fixes #20.
Test plan
bump-default-version.shsanity-tested standalone against single/double-quoted control files, trailing comments, multiple files, and error casestest-allsuite: 256/256 passed, 0 skipped