Skip to content

fix(scripts): tag each module on the commit that introduced its version - #1168

Merged
matifali merged 1 commit into
mainfrom
fix/tag-release-on-merge-commit
Oct 9, 2026
Merged

matifali merged 1 commit into
mainfrom
fix/tag-release-on-merge-commit

Conversation

@matifali

@matifali matifali commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Description

tag_release.sh tagged every untagged module on the currently checked-out commit (HEAD). In a bulk release, where several modules merged since the last run, every tag pointed at the same commit, and that commit could include changes newer than the version being tagged.

It now walks each module README's first-parent history, newest first, and tags the commit where the module block's version became the current value. With squash merges that is the PR's merge commit. The commit is resolved while scanning, so the "Tags to be created" list shows tag -> sha and --dry-run previews the real targets.

The script never checks out anything (it tags by SHA), so the working tree and HEAD are unchanged after a bulk run.

Notes:

  • Shallow clones can't be resolved reliably, so it warns and tags HEAD there.
  • A version that was reverted and re-bumped resolves to the latest bump.
  • A tag now contains the module as of its bump commit, not later changes made without a version bump.
  • MAINTAINER.md updated: no more checking out the merge commit first.

Type of Change

  • Bug fix

Testing & Validation

  • Tests pass (bun test) (no tests cover this script)
  • Code formatted (bun fmt)
  • Changes tested locally: --dry-run over all modules, and the commit lookup against jetbrains (revert/re-bump), jfrog-token, antigravity, vault-token

Real run

Ran from this branch on macOS (after a dry run on macOS and on a Linux dogfood workspace, bash 5.3 / git 2.53, with matching output). It tagged the four pending modules, each on the commit that introduced its version. With the old script, all four would have pointed at HEAD (f21e23b2).

Tag Tagged commit Merge commit subject On origin
release/coder/agent-relay-claude-code/v0.2.0 84519820 feat(agent-relay-claude-code): declare and expose the agent_relay_client_platform parameter (#1147) yes
release/coder/aibridge-proxy/v1.0.1 6f894e74 chore: AI Bridge -> AI Gateway rename (#1118) yes
release/coder/jfrog-oauth/v1.4.0 f21e23b2 feat(jfrog): add pnpm package manager support (#1078) yes
release/coder/jfrog-token/v1.4.0 f21e23b2 feat(jfrog): add pnpm package manager support (#1078) yes

Pushed in two batches (3 + 1), 4 created, 0 failed.

Related Issues

None


Generated with Claude Code using Claude

@linear-code

linear-code Bot commented Oct 7, 2026

Copy link
Copy Markdown

REG-128

@matifali
matifali enabled auto-merge (squash) October 9, 2026 07:03
@matifali
matifali disabled auto-merge October 9, 2026 07:04
tag_release.sh tagged every module on HEAD, so a bulk release run after
several merges pointed all tags at the same commit. Walk each README's
first-parent history instead and tag the commit that introduced the
module's current version. Falls back to HEAD with a warning on shallow
clones.
@matifali
matifali force-pushed the fix/tag-release-on-merge-commit branch from e9dd1a1 to 4fe4611 Compare October 9, 2026 07:04
@matifali
matifali merged commit a1600a8 into main Oct 9, 2026
4 checks passed
@matifali
matifali deleted the fix/tag-release-on-merge-commit branch October 9, 2026 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants