Skip to content

Fix release job crash when dev version bump is a no-op#413

Merged
blink1073 merged 1 commit intoCalysto:mainfrom
blink1073:fix-release-job-again
Mar 22, 2026
Merged

Fix release job crash when dev version bump is a no-op#413
blink1073 merged 1 commit intoCalysto:mainfrom
blink1073:fix-release-job-again

Conversation

@blink1073
Copy link
Contributor

@blink1073 blink1073 commented Mar 22, 2026

References

#411

Description

When releasing an rc version (e.g. 1.0.0rc5), bump_dev.py intentionally returns the version unchanged because it already has a pre-release suffix. This means poetry version makes no modification to pyproject.toml, so git commit exits with code 1 on "nothing to commit". With set -e active in the shell environment, this crashes the release job.

Changes

  • Guard the dev-version commit in action.yml with git diff --staged --quiet; skip the commit (and push) silently when there are no staged changes.

Backwards-incompatible changes

None

Testing

Dry-run release workflow triggers this code path with rc versions.

AI usage

  • Some or all of the content of this PR was generated by AI.
  • The human author has carefully reviewed this PR and run this code.
  • AI tools and models used: Claude Sonnet 4.6 (Claude Code)

When releasing an rc version, bump_dev.py returns the version unchanged,
so poetry version has nothing to modify and git commit fails on "nothing
to commit". Guard the commit with a git diff --staged --quiet check.
@blink1073 blink1073 merged commit b5c600e into Calysto:main Mar 22, 2026
21 of 22 checks passed
@blink1073 blink1073 deleted the fix-release-job-again branch March 22, 2026 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant