Skip to content

Stamp plugin version at release time#355

Merged
jeremy merged 4 commits intomainfrom
plugin-version-tracking
Mar 24, 2026
Merged

Stamp plugin version at release time#355
jeremy merged 4 commits intomainfrom
plugin-version-tracking

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Mar 23, 2026

Summary

  • Adds scripts/stamp-plugin-version.sh that uses jq to write the CLI version into .claude-plugin/plugin.json
  • Adds a GoReleaser pre-hook to call the script with the release tag before building
  • Changes the checked-in plugin version to "dev" so it's obvious it's a placeholder

Claude Code uses the version field in plugin.json to detect when updates are available. Without this, the version was hardcoded at 0.1.0 and never bumped on release.

Test plan

  • scripts/stamp-plugin-version.sh 1.0.0 correctly stamps plugin.json, then restoring to dev
  • goreleaser release --snapshot --clean produces archives with the correct version in plugin.json

Add a GoReleaser pre-hook that writes the CLI version into
.claude-plugin/plugin.json before the build, so Claude Code
can detect updates. The checked-in version is 'dev' — GoReleaser
overrides it with the release tag.
Copilot AI review requested due to automatic review settings March 23, 2026 20:52
@github-actions github-actions bot added the plugin Claude Code plugin label Mar 23, 2026
@github-actions
Copy link

github-actions bot commented Mar 23, 2026

Sensitive Change Detection (shadow mode)

This PR modifies control-plane files:

  • .goreleaser.yaml

Shadow mode — this check is informational only. When activated, changes to these paths will require approval from a maintainer.

@github-actions github-actions bot added the enhancement New feature or request label Mar 23, 2026
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.

No issues found across 3 files

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 aims to ensure the Claude Code plugin manifest (.claude-plugin/plugin.json) reflects the CLI release version at build/release time so Claude Code can detect available updates.

Changes:

  • Added a stamping script (scripts/stamp-plugin-version.sh) that updates the plugin manifest version via jq.
  • Wired the script into GoReleaser as a before.hooks step using the release version.
  • Set the checked-in plugin manifest version to "dev" as a placeholder.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
scripts/stamp-plugin-version.sh New script to write a provided version into .claude-plugin/plugin.json.
.goreleaser.yaml Adds a pre-build hook to run the stamping script with {{ .Version }}.
.claude-plugin/plugin.json Changes checked-in version from a fixed release number to "dev".

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: 153e0da9ba

ℹ️ 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 (changes from recent commits).

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/stamp-plugin-version.sh">

<violation number="1" location="scripts/stamp-plugin-version.sh:4">
P3: Avoid redirecting stderr to `/dev/null` in this dependency check; keep stderr visible for diagnostics while only suppressing stdout.

(Based on your team's feedback about keeping script errors visible instead of silencing stderr.) [FEEDBACK_USED]</violation>
</file>

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

Copilot AI review requested due to automatic review settings March 23, 2026 23:03
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 3 out of 3 changed files in this pull request and generated 1 comment.


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

@jeremy jeremy merged commit 032ba9e into main Mar 24, 2026
27 checks passed
@jeremy jeremy deleted the plugin-version-tracking branch March 24, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request plugin Claude Code plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants