Skip to content

Add post-tag-version-bump to freeze default_version after a release - #95

Draft
jnasbyupgrade wants to merge 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-20-stable-version-bump
Draft

Add post-tag-version-bump to freeze default_version after a release#95
jnasbyupgrade wants to merge 1 commit into
Postgres-Extensions:masterfrom
jnasbyupgrade:issue-20-stable-version-bump

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

Summary

  • Adds make post-tag-version-bump, which bumps each extension's default_version to a placeholder alias (stable by default, via the new bump-default-version.sh script) so ongoing development after a release doesn't silently regenerate and overwrite the just-released version's SQL file.
  • Deliberately a separate, explicit step -- not wired into tag/dist, since both of those run routinely outside of an actual release (including in this project's own test suite) and dist is documented/tested to leave the repository clean.
  • New overridable variables, following the existing PGXNTOOL_ENABLE_*/PGXNTOOL_* pattern: PGXNTOOL_ENABLE_POST_TAG_VERSION_BUMP (default yes) and PGXNTOOL_POST_TAG_VERSION (default stable).
  • _.gitignore now ignores sql/*--stable.sql to match the default placeholder.

Fixes #20.

Test plan

  • bump-default-version.sh sanity-tested standalone against single/double-quoted control files, trailing comments, multiple files, and error cases
  • Paired test coverage in pgxntool-test PR (see cross-reference below)
  • Full test-all suite: 256/256 passed, 0 skipped

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>
@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: afefa09d-2b7b-45ed-904b-2c82120058d6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Post-release workflow: immediately bump default_version to 'unstable'

1 participant