Skip to content

Bump types ignore the workspace's manifest version #946

Open

Description

@sentry-junior

In a multi-workspace repo, a release workflow that takes a patch/minor/major choice can't pass it straight to craft prepare (or the action's version input). Bump types are applied to the latest tag for the workspace's tag prefix, and fall back to 0.0.0 when there is none (resolveVersion in src/commands/prepare.ts).

  • A workspace's first release ignores its package.json. A package at 1.0.0-dev.0 with no tags yet gets 0.0.1/0.1.0/1.0.0 depending on the bump, not the next version after its manifest version.
  • Workflows work around it by reading the manifest and computing the version themselves. getsentry/toolkit's Release workflow reads <package>/package.json and runs semver -i "$BUMP" before calling getsentry/craft@v3 with an explicit version.
  • The same workflow also maps a short product name (cli, logger, mcp) to the workspace directory (packages/cli, ...) in a case script, since the workspace input takes only the configured workspace key.

Automatic version bumping (writing the new version into the workspace's package.json) already works per workspace since #936; this is about resolving the version to release.

Raised during review of getsentry/toolkit#1773.

--

View Session in Sentry

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