Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .craft.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
minVersion: "3.7.0"
minVersion: "3.8.0"
workspaces:
packages/cli:
changelog:
Expand All @@ -16,7 +16,19 @@ workspaces:
style: Keep it concise and friendly for developers; avoid hype.
versioning:
policy: auto
preReleaseCommand: bash -c 'cd packages/cli && node --experimental-strip-types script/bump-version.ts --pre'
# The npm targets bump only packages/cli/package.json. These files ship
# with every CLI release and carry its version too. Craft writes them for
# the release and again for the next -dev version (postReleaseBump).
files:
# Published at the CLI's version; its bundle script fails on a mismatch.
- path: packages/mcp-server/package.json
# The plugin's version stays a plain release version, even on -dev builds.
- path: packages/cli/plugins/sentry-cli/.claude-plugin/plugin.json
stripPrerelease: true
# Skill frontmatter. The skill generator embeds the version too, but it
# needs a gitignored API schema that Craft's checkout doesn't have.
- path: packages/cli/plugins/sentry-cli/skills/sentry-cli/SKILL.md
- path: packages/cli/plugins/sentry-cli/skills/sentry-cli/references/*.md
postReleaseBump: true
releaseBranchPrefix: release/cli
artifactProvider:
Expand Down
7 changes: 4 additions & 3 deletions docs/releases/stdio.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ smoke-tests the result.
The `packages/cli` Craft workspace releases both packages: run the **Release**
workflow with `product: cli`.

- `packages/cli/script/bump-version.ts` sets `packages/mcp-server/package.json`
to the CLI's version, both for the release and for the next `-dev` version,
which Craft's `postReleaseBump` writes and pushes after publishing.
- Craft sets `packages/mcp-server/package.json` to the CLI's version through
`versioning.files` in `.craft.yml` (Craft 3.8.0+), both for the release and
for the next `-dev` version, which `postReleaseBump` writes and pushes after
publishing.
The bundle script fails if the two versions differ.
- `.github/workflows/cli-build.yml` bundles, tests, and packs the package next
to the CLI's npm package and uploads it as `mcp-server-npm-package`.
Expand Down
145 changes: 0 additions & 145 deletions packages/cli/script/bump-version.ts

This file was deleted.

127 changes: 0 additions & 127 deletions packages/cli/test/script/bump-version.test.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/mcp-server/script/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const cliPkg = JSON.parse(
) as { version: string };

// Each CLI release publishes this package at the CLI's version, set by
// `packages/cli/script/bump-version.ts`.
// `versioning.files` in `.craft.yml`.
if (pkg.version !== cliPkg.version) {
console.error(
`\nError: @sentry/mcp-server is at ${pkg.version} but the CLI is at ${cliPkg.version}. Both must share one version.\n`,
Expand Down
Loading