mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-05 16:53:29 +08:00
fix: sync plugin.json version with latest tag (#171)
Sync plugin.json version to 1.4.1, add CI check to verify versions match on release, and add release.sh script. Fixes #170.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "everything-claude-code",
|
"name": "everything-claude-code",
|
||||||
"version": "1.2.0",
|
"version": "1.4.1",
|
||||||
"description": "Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use",
|
"description": "Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Affaan Mustafa",
|
"name": "Affaan Mustafa",
|
||||||
|
|||||||
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@@ -25,6 +25,18 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Verify plugin.json version matches tag
|
||||||
|
env:
|
||||||
|
TAG_NAME: ${{ github.ref_name }}
|
||||||
|
run: |
|
||||||
|
TAG_VERSION="${TAG_NAME#v}"
|
||||||
|
PLUGIN_VERSION=$(grep -oE '"version": *"[^"]*"' .claude-plugin/plugin.json | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
|
if [ "$TAG_VERSION" != "$PLUGIN_VERSION" ]; then
|
||||||
|
echo "::error::Tag version ($TAG_VERSION) does not match plugin.json version ($PLUGIN_VERSION)"
|
||||||
|
echo "Run: ./scripts/release.sh $TAG_VERSION"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Generate changelog
|
- name: Generate changelog
|
||||||
id: changelog
|
id: changelog
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ const {
|
|||||||
getClaudeDir,
|
getClaudeDir,
|
||||||
ensureDir,
|
ensureDir,
|
||||||
readFile,
|
readFile,
|
||||||
writeFile,
|
|
||||||
log
|
log
|
||||||
} = require('./utils');
|
} = require('./utils');
|
||||||
|
|
||||||
|
|||||||
67
scripts/release.sh
Executable file
67
scripts/release.sh
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Release script for bumping plugin version
|
||||||
|
# Usage: ./scripts/release.sh VERSION
|
||||||
|
|
||||||
|
VERSION="${1:-}"
|
||||||
|
PLUGIN_JSON=".claude-plugin/plugin.json"
|
||||||
|
|
||||||
|
# Function to show usage
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $0 VERSION"
|
||||||
|
echo "Example: $0 1.5.0"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Validate VERSION is provided
|
||||||
|
if [[ -z "$VERSION" ]]; then
|
||||||
|
echo "Error: VERSION argument is required"
|
||||||
|
usage
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Validate VERSION is semver format (X.Y.Z)
|
||||||
|
if ! [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
echo "Error: VERSION must be in semver format (e.g., 1.5.0)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check current branch is main
|
||||||
|
CURRENT_BRANCH=$(git branch --show-current)
|
||||||
|
if [[ "$CURRENT_BRANCH" != "main" ]]; then
|
||||||
|
echo "Error: Must be on main branch (currently on $CURRENT_BRANCH)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check working tree is clean
|
||||||
|
if ! git diff --quiet || ! git diff --cached --quiet; then
|
||||||
|
echo "Error: Working tree is not clean. Commit or stash changes first."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Verify plugin.json exists
|
||||||
|
if [[ ! -f "$PLUGIN_JSON" ]]; then
|
||||||
|
echo "Error: $PLUGIN_JSON not found"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Read current version
|
||||||
|
OLD_VERSION=$(grep -oE '"version": *"[^"]*"' "$PLUGIN_JSON" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
|
||||||
|
echo "Bumping version: $OLD_VERSION -> $VERSION"
|
||||||
|
|
||||||
|
# Update version in plugin.json (cross-platform sed)
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
# macOS
|
||||||
|
sed -i '' "s/\"version\": *\"[^\"]*\"/\"version\": \"$VERSION\"/" "$PLUGIN_JSON"
|
||||||
|
else
|
||||||
|
# Linux
|
||||||
|
sed -i "s/\"version\": *\"[^\"]*\"/\"version\": \"$VERSION\"/" "$PLUGIN_JSON"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Stage, commit, tag, and push
|
||||||
|
git add "$PLUGIN_JSON"
|
||||||
|
git commit -m "chore: bump plugin version to $VERSION"
|
||||||
|
git tag "v$VERSION"
|
||||||
|
git push origin main "v$VERSION"
|
||||||
|
|
||||||
|
echo "Released v$VERSION"
|
||||||
Reference in New Issue
Block a user