Skip to content

fix(release): restore version bumping for releases#4191

Merged
BYK merged 2 commits intomasterfrom
fix/release-nightly-tags
Feb 25, 2026
Merged

fix(release): restore version bumping for releases#4191
BYK merged 2 commits intomasterfrom
fix/release-nightly-tags

Conversation

@BYK
Copy link
Member

@BYK BYK commented Feb 25, 2026

Fixes #4181

Root cause

Bumping minVersion to 2.21.6 in .craft.yml (commit f28e0bc) silently broke the release version bump. Craft 2.21.0+ skips running scripts/bump-version.sh by default and instead auto-bumps based on configured targets — but the only target here is github, which doesn't support auto-bumping. The result: .env shipped with :nightly image tags in the 26.2.0 release.

Changes

  • .craft.yml: add preReleaseCommand: bash scripts/bump-version.sh to explicitly opt out of auto-bump and run the custom script
  • scripts/bump-version.sh: read CRAFT_OLD_VERSION/CRAFT_NEW_VERSION env vars (Craft's preferred interface), with positional-arg fallback so post-release.sh continues to work unchanged; fix the README sed pattern that has been a no-op since the README was rewritten in Sep 2024
  • .github/workflows/release.yml: remove calver: true — not a valid input for the Craft action (CalVer is configured via versioning.policy in .craft.yml)

- 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`)
@github-actions
Copy link

github-actions bot commented Feb 25, 2026

Changelog Preview

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

Release

  • Restore version bumping for releases by BYK in #4191
  • Be explicit about pre release and post release command by hubertdeng123 in #4190

Other

  • Prevent script injection vulnerability in get-compose-action by fix-it-felix-sentry in #4179

Internal Changes 🔧

  • (deps) Bump getsentry/craft from 2.21.4 to 2.21.7 by dependabot in #4188

Other

  • Use docker-compose shipped in GHA runners by aminvakil in #4184

🤖 This preview updates automatically when you update the PR.

@BYK BYK marked this pull request as ready for review February 25, 2026 19:10
@BYK BYK enabled auto-merge (squash) February 25, 2026 20:30
preReleaseCommand: "scripts/bump-version.sh"
postReleaseCommand: "scripts/post-release.sh"
preReleaseCommand: bash scripts/bump-version.sh
artifactProvider:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@BYK BYK merged commit 4016369 into master Feb 25, 2026
18 checks passed
@BYK BYK deleted the fix/release-nightly-tags branch February 25, 2026 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

released .env file refers to nightly docker tags

3 participants