Skip to content

meta(cli): Use Craft's versioning.files instead of the bump script - #1825

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
meta/cli-craft-version-files
Open

sentry-junior[bot] wants to merge 1 commit into
mainfrom
meta/cli-craft-version-files

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Craft 3.8.0 adds versioning.files (getsentry/craft#955, which closes getsentry/craft#948, filed with toolkit as the example). A release unit can now list extra files for Craft's automatic version bump, and postReleaseBump writes them too. The CLI workspace used a custom preReleaseCommand only because that option didn't exist, and that command turned off the automatic bump.

What moved where:

  • packages/cli/package.json: Craft's npm target already bumps it once the preReleaseCommand is gone.
  • packages/mcp-server/package.json, the Claude plugin's plugin.json (with stripPrerelease: true, so it stays X.Y.Z on -dev versions), and the version frontmatter in the CLI skill's SKILL.md and references/*.md are now versioning.files entries in .craft.yml.
  • packages/cli/script/bump-version.ts and its test are gone. The release docs and the comment in the mcp-server bundle script now point at .craft.yml.

minVersion goes from 3.7.0 to 3.8.0. Craft requires that for versioning.files, and Craft rejects a config that sets both versioning.files and preReleaseCommand.

Craft's file matching is strict: it fails craft prepare if a path matches nothing or a matched file has no version to update. Every file in references/ has exactly one version: frontmatter line, so the glob is safe. The skill copies under apps/cli-docs/public/.well-known/skills/ and packages/cli/.cursor/skills/ are symlinks to the plugin skill, so they need no entries.

I ran craft prepare --dry-run --workspace packages/cli with Craft 3.8.0 for 99.0.0 and 99.1.0-dev.0. Both changed the same 45 files, and only their version lines. plugin.json got 99.1.0 for the prerelease.

via @BYK.

--

View Session in Sentry

Craft 3.8.0 can write the release version into extra files during its
automatic bump and postReleaseBump, so the CLI workspace no longer needs
a custom preReleaseCommand.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sentry-local Ready Ready Preview Nov 2, 2026 11:52pm UTC

Request Review

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Nov 2, 2026

This branch was successfully deployed

1 active deployment
Preview — bd5cd5ad Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sync the release version into extra files during a release

1 participant