Skip to content

Commit 29b1dc6

Browse files
Merge branch 'main' into chase/hooks4
2 parents 57adae7 + 30ba8f9 commit 29b1dc6

File tree

2 files changed

+56
-1
lines changed

2 files changed

+56
-1
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Plugin Version Check
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'hooks/plugin-claude/**'
7+
8+
jobs:
9+
check-version-bump:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout PR branch
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Get plugin.json version from PR
18+
id: pr-version
19+
run: |
20+
PR_VERSION=$(jq -r '.version' hooks/plugin-claude/.claude-plugin/plugin.json)
21+
echo "version=$PR_VERSION" >> $GITHUB_OUTPUT
22+
echo "PR version: $PR_VERSION"
23+
24+
- name: Get plugin.json version from base branch
25+
id: base-version
26+
run: |
27+
git fetch origin ${{ github.base_ref }}
28+
BASE_VERSION=$(git show origin/${{ github.base_ref }}:hooks/plugin-claude/.claude-plugin/plugin.json | jq -r '.version')
29+
echo "version=$BASE_VERSION" >> $GITHUB_OUTPUT
30+
echo "Base version: $BASE_VERSION"
31+
32+
- name: Compare versions
33+
env:
34+
PR_VERSION: ${{ steps.pr-version.outputs.version }}
35+
BASE_VERSION: ${{ steps.base-version.outputs.version }}
36+
run: |
37+
if [ "$PR_VERSION" == "$BASE_VERSION" ]; then
38+
echo "❌ Error: plugin.json version has not been updated"
39+
echo "Current version: $BASE_VERSION"
40+
echo "Please bump the version in hooks/plugin-claude/.claude-plugin/plugin.json"
41+
exit 1
42+
else
43+
echo "✅ Version has been updated: $BASE_VERSION -> $PR_VERSION"
44+
fi
45+
46+
- name: Validate version format
47+
env:
48+
VERSION: ${{ steps.pr-version.outputs.version }}
49+
run: |
50+
if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'; then
51+
echo "❌ Error: Invalid version format: $VERSION"
52+
echo "Version must follow semantic versioning (e.g., 0.0.3)"
53+
exit 1
54+
fi
55+
echo "✅ Version format is valid: $VERSION"

hooks/plugin-claude/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
"homepage": "https://getgram.ai",
1010
"repository": "https://github.com/gram-ai/gram",
1111
"license": "MIT",
12-
"keywords": ["gram", "hooks", "analytics", "monitoring", "telemetry"]
12+
"keywords": ["gram", "hooks", "mcp", "analytics", "monitoring", "telemetry"]
1313
}

0 commit comments

Comments
 (0)