fix(release): restore version bumping for releases#4191
Merged
Conversation
- Add `preReleaseCommand` to `.craft.yml` so Craft runs the custom bump script instead of silently skipping version bumping (the auto-bump path introduced with minVersion 2.21.0+ only works for npm/pypi/etc. targets, not the `github` target used here) - Switch `bump-version.sh` to read `CRAFT_OLD_VERSION`/`CRAFT_NEW_VERSION` env vars (Craft's preferred interface), falling back to positional args so `post-release.sh` continues to work unchanged - Fix the README `sed` pattern which stopped matching after the README was rewritten in Sep 2024 (removed erroneous backslash before `#`, and relaxed trailing match to allow zero characters after "Sentry") - Remove the invalid `calver: true` input from the Craft action call in `release.yml` (not a recognised input; calver is configured in `.craft.yml` via `versioning.policy`)
Changelog Preview📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛Release
Other
Internal Changes 🔧
Other
🤖 This preview updates automatically when you update the PR. |
| preReleaseCommand: "scripts/bump-version.sh" | ||
| postReleaseCommand: "scripts/post-release.sh" | ||
| preReleaseCommand: bash scripts/bump-version.sh | ||
| artifactProvider: |
There was a problem hiding this comment.
Bug: The removal of postReleaseCommand from .craft.yml will prevent the master branch from being reverted to a 'nightly' version after a release, breaking the release workflow.
Severity: HIGH
Suggested Fix
Restore the postReleaseCommand: "scripts/post-release.sh" line in the .craft.yml file to ensure the post-release script is executed as part of the automated release process.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .craft.yml#L4
Potential issue: The `postReleaseCommand` was removed from the `.craft.yml`
configuration file. This command was responsible for executing the
`scripts/post-release.sh` script, which reverts the `master` branch to a 'nightly'
version after a release is published. Without this configuration, the Craft release
process will no longer trigger the script. As a result, after a release, the `master`
branch will remain on the released version number instead of being updated for
subsequent development, breaking the intended versioning workflow.
Did we get this right? 👍 / 👎 to inform future reviews.
aldy505
approved these changes
Feb 25, 2026
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.
Fixes #4181
Root cause
Bumping
minVersionto2.21.6in.craft.yml(commit f28e0bc) silently broke the release version bump. Craft 2.21.0+ skips runningscripts/bump-version.shby default and instead auto-bumps based on configured targets — but the only target here isgithub, which doesn't support auto-bumping. The result:.envshipped with:nightlyimage tags in the 26.2.0 release.Changes
.craft.yml: addpreReleaseCommand: bash scripts/bump-version.shto explicitly opt out of auto-bump and run the custom scriptscripts/bump-version.sh: readCRAFT_OLD_VERSION/CRAFT_NEW_VERSIONenv vars (Craft's preferred interface), with positional-arg fallback sopost-release.shcontinues to work unchanged; fix the READMEsedpattern that has been a no-op since the README was rewritten in Sep 2024.github/workflows/release.yml: removecalver: true— not a valid input for the Craft action (CalVer is configured viaversioning.policyin.craft.yml)