Skip to content

Stamp plugin version on release#388

Merged
jeremy merged 4 commits intomainfrom
plugin-release
Mar 26, 2026
Merged

Stamp plugin version on release#388
jeremy merged 4 commits intomainfrom
plugin-release

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Mar 26, 2026

Summary

  • plugin.json always said "version": "dev" because stamp-plugin-version.sh only ran in GoReleaser's ephemeral working directory — the stamped value was never committed to main
  • This broke auto-update detection and the CLI's version-mismatch warning (CheckClaudePluginVersion)
  • Adds the plugin stamp to scripts/release.sh so it's committed alongside the nix flake update before tagging, batched into a single "release prep" commit

Test plan

  • scripts/release.sh 0.0.0-test --dry-run prints the stamp step
  • scripts/stamp-plugin-version.sh 1.2.3 stamps plugin.json correctly
  • bin/ci passes with the change
  • After a real release: plugin.json on main shows the release version

plugin.json always said "version": "dev" because stamp-plugin-version.sh
only ran in GoReleaser's ephemeral working directory — the stamped value
was never committed. This meant auto-updates never fired and the CLI's
version-mismatch warning could never match a real version.

Add the plugin stamp to scripts/release.sh so it gets committed to main
before tagging. The nix and plugin changes are now batched into a single
"release prep" commit with a message that reflects which files actually
changed.
Copilot AI review requested due to automatic review settings March 26, 2026 04:24
@github-actions github-actions bot added the bug Something isn't working label Mar 26, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes plugin auto-update/version-mismatch behavior by ensuring the Claude plugin’s plugin.json is stamped with the release version on main as part of the release prep flow (rather than only inside GoReleaser’s ephemeral workspace).

Changes:

  • Move release prep into a single commit step that can include both the nix flake update and the plugin version stamp.
  • Add a “Stamp plugin version” step that runs scripts/stamp-plugin-version.sh (skipped on --dry-run).
  • Commit/push the staged release-prep files before tagging.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd98a0c253

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="scripts/release.sh">

<violation number="1" location="scripts/release.sh:104">
P2: `main` is pushed before `make release-check`, so a failed pre-flight can publish a version bump commit without a corresponding release tag.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Picks up the card step assignees → assignee_ids rename and picomatch
security fix. Updates four call sites that used the old Assignees field.
@github-actions github-actions bot added commands CLI command implementations sdk SDK wrapper and provenance deps labels Mar 26, 2026
Handle all three cases: nix-only, plugin-only, or both. Previously the
message could mention plugin version even when only nix/package.nix was
staged.
Copilot AI review requested due to automatic review settings March 26, 2026 05:08
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Run make release-check before nix/plugin updates so a failing check
never leaves a phantom version stamped on main. Also check for jq
upfront since stamp-plugin-version.sh requires it.
@jeremy jeremy merged commit 454ade3 into main Mar 26, 2026
25 checks passed
@jeremy jeremy deleted the plugin-release branch March 26, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working commands CLI command implementations deps sdk SDK wrapper and provenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants