Repository navigation
Closed
getsentry/toolkit
#1825Description
A release unit often stores its version in more places than the one manifest Craft bumps automatically. Right now the only way to keep those files in sync is a custom preReleaseCommand, and setting one turns off Craft's automatic version bump for that unit.
Current behavior (3.6.0)
- Automatic bumping only writes the release unit's own manifest.
NpmTarget.bumpVersionrunsnpm versionin the release unit directory, plus any npm workspaces under it. It doesn't update apackage.jsonoutside that directory, other JSON files, or Markdown/YAML frontmatter. - Automatic bumping only runs without a
preReleaseCommand. A unit that needs to update one extra file has to take over the whole bump.
Example: getsentry/toolkit
The CLI's Craft workspace (packages/cli) runs packages/cli/script/bump-version.ts as both its pre- and post-release command. As of getsentry/toolkit#1731, the script:
- Sets
packages/cli/package.jsonto the version. Craft can already do this. - Sets
packages/mcp-server/package.jsonto the same version. The MCP server ships with every CLI release, but its package lives outside the CLI workspace. - Sets
versioninplugins/sentry-cli/.claude-plugin/plugin.jsonwith the prerelease suffix removed. - Rewrites the
version:line in the YAML frontmatter ofplugins/sentry-cli/skills/sentry-cli/SKILL.mdandreferences/*.md. Today this only happens in the post-release step.
Proposal
Let a release unit list extra files to update with the new version, and keep the automatic manifest bump on. Roughly:
workspaces:
packages/cli:
versionFiles:
- path: ../mcp-server/package.json # JSON field (default: version)
- path: plugins/sentry-cli/.claude-plugin/plugin.json
stripPrerelease: true
- path: plugins/sentry-cli/skills/sentry-cli/**/*.md
format: frontmatter # YAML frontmatter `version:` keyWith this in place, toolkit could drop the pre-release half of bump-version.ts.
Related
- Built-in development version bump after release #949: built-in development version bump after release. With both, toolkit could delete
bump-version.ts. - Bump types ignore the workspace's manifest version #946: resolving the version from a workspace's manifest. feat(prepare): Bump untagged release units from their project files' version #947 partly addresses it.
- feat(mcp-server): Ship @sentry/mcp-server as a slim bundle that shares CLI auth toolkit#1731: the review thread where this came up.
via @BYK.
--
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat(publish): Add built-in development version bump after release (#950
meta(cli): Use Craft's versioning.files instead of the bump script (#…