Skip to content

fix: sync plugin.json version with latest tag#171

Merged
affaan-m merged 3 commits into
affaan-m:mainfrom
ericcai0814:fix/plugin-json-version-sync
Feb 9, 2026
Merged

fix: sync plugin.json version with latest tag#171
affaan-m merged 3 commits into
affaan-m:mainfrom
ericcai0814:fix/plugin-json-version-sync

Conversation

@ericcai0814

@ericcai0814 ericcai0814 commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bump plugin.json version from 1.2.0 to 1.4.1 to match the latest git tag
  • Add scripts/release.sh — one-command release flow: validates semver format, checks clean working tree and main branch, then bumps version → commits → tags → pushes
  • Add CI safety net in release.yml — verifies the tag version matches plugin.json before creating a GitHub Release; fails with actionable guidance if they drift

Context

plugin.json version has been stuck at 1.2.0 since the initial release, while the actual release is 1.4.1. Although cached content is updated correctly via Git, the mismatched version creates inconsistent metadata in the cache path (~/.claude/plugins/cache/.../1.2.0/) and could cause issues with future cache invalidation logic.

Root cause: the release workflow only validates tag format but never checks plugin.json, and there was no script to keep them in sync.

Closes #170

Test plan

  • bash -n scripts/release.sh — syntax valid
  • plugin.json version is 1.4.1
  • release.sh has executable permission (-rwxr-xr-x)
  • sed regex in release.sh matches grep regex in release.yml
  • Tag format (v$VERSION) consistent between script and workflow
  • CI passes (markdownlint, ESLint unaffected by these changes)

plugin.json version has been stuck at 1.2.0 since the initial release,
causing Claude Code's plugin cache to serve stale content. This updates
the version to 1.4.1 and adds guardrails to prevent future drift:

- Bump plugin.json version from 1.2.0 to 1.4.1
- Add scripts/release.sh for one-command version bump + tag + push
- Add CI step in release.yml to verify tag matches plugin.json

Closes affaan-m#170
@coderabbitai

coderabbitai Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

Bumps .claude-plugin/plugin.json version to 1.4.1, adds scripts/release.sh to validate and perform a versioned release (semver check, branch/state validation, file update, commit/tag/push), adds a CI step that verifies plugin.json version matches the Git tag, and removes an unused import in a helper file.

Changes

Cohort / File(s) Summary
Plugin manifest
.claude-plugin/plugin.json
Version field changed from 1.2.01.4.1.
Release automation
scripts/release.sh
New script: enforces semver arg, ensures on main with clean tree, updates .claude-plugin/plugin.json version (cross‑platform sed), commits, tags v{VERSION}, and pushes.
CI verification
.github/workflows/release.yml
Added step: derives tag version, reads .claude-plugin/plugin.json version, compares them and fails the workflow if they differ.
Minor cleanup
scripts/lib/session-aliases.js
Removed unused writeFile import; no behavior changes.

Sequence Diagram

sequenceDiagram
    actor Developer
    participant ReleaseScript as "scripts/release.sh"
    participant PluginFile as ".claude-plugin/plugin.json"
    participant Git as "git / origin"
    participant CI as "GitHub Actions"

    Developer->>ReleaseScript: ./scripts/release.sh v1.4.1
    ReleaseScript->>ReleaseScript: Validate semver, branch (main), clean tree
    ReleaseScript->>PluginFile: Read current version
    ReleaseScript->>PluginFile: Replace \"version\" -> 1.4.1
    ReleaseScript->>Git: git add/commit & tag v1.4.1
    ReleaseScript->>Git: push origin main & push tag
    Git->>CI: push triggers release workflow
    CI->>Git: Read tag (v1.4.1) -> TAG_VERSION
    CI->>PluginFile: Read plugin.json version -> PLUGIN_VERSION
    CI->>CI: Compare TAG_VERSION vs PLUGIN_VERSION
    alt match
        CI->>CI: Proceed with changelog & publish
    else mismatch
        CI->>CI: Fail workflow with error
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I nudged the tag and bumped the file,
A careful hop — a tiny style.
Script and CI hold paws so tight,
They check the version, day and night,
Releases ready, snug and bright. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main objective: synchronizing plugin.json version with the latest git tag (1.2.0 → 1.4.1).
Linked Issues check ✅ Passed All coding requirements from issue #170 are met: plugin.json version bumped to 1.4.1, release.sh script added for automated version management, and CI validation step added.
Out of Scope Changes check ✅ Passed The removal of unused writeFile import from session-aliases.js, while fixing a pre-existing linting issue, is incidental and does not alter the PR's core scope of version synchronization.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@scripts/release.sh`:
- Line 49: The grep pattern used to extract OLD_VERSION uses GNU-only '\+' in
basic regex and fails on BSD grep; update the extraction command that builds
OLD_VERSION to use extended regex (grep -oE) or a POSIX-compatible BRE so it
works on macOS—specifically change the invocation that references OLD_VERSION
and PLUGIN_JSON to use grep -oE with an ERE like '"version":
*"([0-9]+\.[0-9]+\.[0-9]+)"' (and capture/extract the numeric group) or adjust
the BRE to avoid '\+' so the version string is reliably extracted.
🧹 Nitpick comments (2)
scripts/release.sh (1)

61-65: No guard against an already-existing tag.

If v$VERSION already exists locally or on the remote, git tag will fail with an unhelpful message. Consider checking first and providing a clear error.

Proposed improvement
+# Check if tag already exists
+if git rev-parse "v$VERSION" >/dev/null 2>&1; then
+  echo "Error: Tag v$VERSION already exists"
+  exit 1
+fi
+
 # Stage, commit, tag, and push
 git add "$PLUGIN_JSON"
 git commit -m "chore: bump plugin version to $VERSION"
 git tag "v$VERSION"
.github/workflows/release.yml (1)

33-33: Version extraction regex is looser than the one in release.sh.

[0-9][0-9.]* could match malformed versions like 1..2 or 1.2.3.4. For consistency with the release script's strict semver extraction, use a tighter pattern:

Proposed fix
-          PLUGIN_VERSION=$(grep -o '"version": *"[^"]*"' .claude-plugin/plugin.json | grep -o '[0-9][0-9.]*')
+          PLUGIN_VERSION=$(grep -oE '"version": *"[^"]*"' .claude-plugin/plugin.json | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')

Comment thread scripts/release.sh Outdated
Fixes pre-existing ESLint no-unused-vars error that was causing CI
lint failures on main.
@ericcai0814

Copy link
Copy Markdown
Contributor Author

CI Lint Note

The Lint check failure is not caused by this PR. All failing checks are pre-existing issues on main:

File Error Rule
commands/multi-execute.md Space in code span MD038
commands/multi-plan.md Space in code span MD038
commands/multi-workflow.md Space in code span MD038
commands/pm2.md Missing blank lines around table MD058
commands/pm2.md Multiple top-level headings (x2) MD025

None of these files are touched by this PR. The errors were previously hidden because an ESLint error in session-aliases.js (also pre-existing) caused the Lint job to exit before reaching the markdownlint step — this PR fixes that ESLint error in a separate commit.

BSD grep on macOS does not support \+ in BRE mode, causing silent
match failure. Switch to grep -oE (extended regex) for cross-platform
compatibility. Also unify the regex pattern between release.sh and
release.yml to strictly match X.Y.Z format.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Automated review: checks are failing. Please fix failures before review.

@affaan-m affaan-m merged commit d2191d0 into affaan-m:main Feb 9, 2026
37 of 38 checks passed
bus1029 pushed a commit to bus1029/everything-claude-code that referenced this pull request Feb 24, 2026
Sync plugin.json version to 1.4.1, add CI check to verify versions match on release, and add release.sh script. Fixes affaan-m#170.
ericcai0814 added a commit to ericcai0814/everything-claude-code that referenced this pull request May 26, 2026
在 README 最頂部插入 fork banner,明確標示:
- 本 fork 的主要貢獻在 upstream affaan-m/ECC 的 PR affaan-m#161 + affaan-m#171(已 merged)
- 貢獻為 spec-driven 產出(specs by me, implementation via Claude Code, reviewed and submitted by me)
- 上游 maintainer merge = 最強的 external code review signal
- 保留原 upstream README 不動

目的:讓 GitHub profile 點進 fork 的 reviewer 第一眼看到 PR signal,避免誤判為「0 commit fork」。

Co-authored-by: EricCaiCai <278623129+EricCaiCai@users.noreply.github.com>
FrancescoRosciano pushed a commit to FRosciano-Mambo/everything-claude-code that referenced this pull request Jun 1, 2026
Sync plugin.json version to 1.4.1, add CI check to verify versions match on release, and add release.sh script. Fixes affaan-m#170.
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.

plugin.json version still shows 1.2.0 after updating to v1.4.1

2 participants