Skip to content

Built-in development version bump after release #949

Closed

Description

@sentry-junior

After a release, many projects bump the manifest to the next development version and push that commit. Craft has no built-in support for this; postReleaseCommand is the only hook. Craft's own .craft.yml uses it to run npm version preminor --preid=dev, commit with #skip-changelog, git pull --rebase and push.

Why it matters

Nightly or snapshot builds often take their version from the manifest. getsentry/toolkit's CLI builds nightlies as X.Y.Z-dev.<timestamp> from packages/cli/package.json (scripts/cli-nightly-version.mjs). Without the post-release bump, nightlies built after 0.47.0 would be numbered 0.47.0-dev.*, which sorts below the stable release.

Toolkit handles this with packages/cli/script/bump-version.ts --post, which:

  1. Bumps packages/cli/package.json to preminor --preid=dev.
  2. Applies the same version to packages/mcp-server/package.json, plugin.json and the skill frontmatter.
  3. Commits with #skip-changelog, then pulls with rebase and pushes.

Proposal

Add an opt-in post-release bump, for example:

postReleaseBump:
  bump: preminor   # or prepatch, premajor
  preid: dev

After a successful publish, Craft would:

  1. Apply the bump to the release unit's manifest through the same target logic as the automatic pre-release bump.
  2. Commit with #skip-changelog, then pull with rebase and push.

It should work per workspace and run before or instead of postReleaseCommand. If #948 lands, it should also update the extra version files listed there.

This would cover what most postReleaseCommand scripts do today, Craft's own included. Together with #948, toolkit could delete bump-version.ts.

Related

via @BYK.

--

View Session in Sentry

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions