Skip to content

build(version): derive the version from the git tag with setuptools-scm - #650

Open
coillteoir wants to merge 1 commit into
jj-stack/refactor-version-accept-pep-440-versions-in-parse-version-nvuorwuxfrom
jj-stack/build-version-derive-the-version-from-the-git-tag-with-setuptools-scm-nqymqnmp
Open

coillteoir wants to merge 1 commit into
jj-stack/refactor-version-accept-pep-440-versions-in-parse-version-nvuorwuxfrom
jj-stack/build-version-derive-the-version-from-the-git-tag-with-setuptools-scm-nqymqnmp

Conversation

@coillteoir

Copy link
Copy Markdown
Contributor

The tag is now the version. setuptools-scm writes the git-ignored cloudsmith_cli/_version.py at build or install time and core.version.get_version reads it, falling back to the installed package metadata and then to 0.0.0.

  • Remove cloudsmith_cli/data/VERSION, the root VERSION symlink, bumpversion and its config.
  • Add the scm-version composite action. Release, binaries, dev-release and image-build compute the version once and pass it to container builds as SETUPTOOLS_SCM_PRETEND_VERSION, because they have no git tags.
  • release.yml now fails unless the version derived from git equals the tag.
  • Untagged builds report a development version such as 1.32.1.dev3+g1a2b3c4, and binaries artifacts and dev-release versions are named after it.
  • Document tagging as the release step.

The tag is now the version. setuptools-scm writes the git-ignored
cloudsmith_cli/_version.py at build or install time and
core.version.get_version reads it, falling back to the installed package
metadata and then to 0.0.0.

- Remove cloudsmith_cli/data/VERSION, the root VERSION symlink, bumpversion
  and its config.
- Add the scm-version composite action. Release, binaries, dev-release and
  image-build compute the version once and pass it to container builds as
  SETUPTOOLS_SCM_PRETEND_VERSION, because they have no git tags.
- release.yml now fails unless the version derived from git equals the tag.
- Untagged builds report a development version such as 1.32.1.dev3+g1a2b3c4,
  and binaries artifacts and dev-release versions are named after it.
- Document tagging as the release step.
@coillteoir
coillteoir requested review from a team and cloudsmith-bot as code owners December 1, 2026 18:35
@coillteoir
coillteoir added this pull request to stack #652 December 1, 2026 18:35

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

persist-credentials: false

- id: scm
uses: ./.github/actions/scm-version

# The binaries were built with this same version.
- id: scm
uses: ./.github/actions/scm-version
persist-credentials: false

- id: scm
uses: ./.github/actions/scm-version
persist-credentials: false

- id: scm
uses: ./.github/actions/scm-version

This branch has not been deployed

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants