Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"metadata": {
"description": "Roblox Knowledge Engine — queries 11 data sources to answer any Roblox development question",
"version": "1.0.0"
"version": "1.0.1"
},
"plugins": [
{
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bloxus",
"version": "1.0.0",
"version": "1.0.1",
"description": "Roblox Knowledge Engine — queries 11 data sources to answer any Roblox development question",
"author": {
"name": "CyanoTex"
Expand Down
29 changes: 29 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
# Auto-bump plugin version on first code commit per branch.

# Skip on main
branch=$(git symbolic-ref --short HEAD 2>/dev/null)
if [ "$branch" = "main" ]; then
exit 0
fi

# Skip if already bumped vs main
main_version=$(git show main:.claude-plugin/plugin.json 2>/dev/null | grep -oP '"version":\s*"\K[^"]+')
current_version=$(grep -oP '"version":\s*"\K[^"]+' .claude-plugin/plugin.json)

if [ "$main_version" != "$current_version" ]; then
exit 0
fi

# Skip if only docs/config staged
ignored='README\.md|LICENSE|CONTRIBUTING\.md|\.github/|\.githooks/|docs/'
version_files='\.claude-plugin/(plugin|marketplace)\.json'
code_staged=$(git diff --cached --name-only | grep -vE "$ignored" | grep -vE "$version_files" | head -1)

if [ -z "$code_staged" ]; then
exit 0
fi

# Bump and stage
node "$(git rev-parse --show-toplevel)/scripts/bump-version.js"
git add .claude-plugin/plugin.json .claude-plugin/marketplace.json
52 changes: 52 additions & 0 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Version Bump Check

on:
pull_request:
branches: [main]

jobs:
check-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check if code changed without version bump
run: |
BASE=${{ github.event.pull_request.base.sha }}
HEAD=${{ github.event.pull_request.head.sha }}

IGNORED="README\.md|LICENSE|CONTRIBUTING\.md|\.github/|\.githooks/|docs/"

CODE_CHANGED=$(git diff --name-only "$BASE" "$HEAD" | grep -vE "$IGNORED" | head -1)

if [ -z "$CODE_CHANGED" ]; then
echo "Only docs/config changed — no version bump needed."
exit 0
fi

echo "Code files changed:"
git diff --name-only "$BASE" "$HEAD" | grep -vE "$IGNORED"

VERSION_BUMPED=$(git diff --name-only "$BASE" "$HEAD" | grep -E "^\.claude-plugin/(plugin|marketplace)\.json$" | head -1)

if [ -z "$VERSION_BUMPED" ]; then
echo ""
echo "::error::Code changed but no version bump detected. The pre-commit hook should handle this automatically — run: git config core.hooksPath .githooks"
exit 1
fi

PLUGIN_VER=$(git show "$HEAD:.claude-plugin/plugin.json" | grep -oP '"version":\s*"\K[^"]+')
MARKET_VER=$(git show "$HEAD:.claude-plugin/marketplace.json" | grep -oP '"version":\s*"\K[^"]+')

echo ""
echo "Versions: plugin.json=$PLUGIN_VER, marketplace.json=$MARKET_VER"

if [ "$PLUGIN_VER" != "$MARKET_VER" ]; then
echo ""
echo "::error::Version mismatch! plugin.json=$PLUGIN_VER, marketplace.json=$MARKET_VER"
exit 1
fi

echo "Version bump confirmed: $PLUGIN_VER"
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ Bloxus is an AI coding-assistant skill that automatically activates when you wor
- **Context7 sources**: Queried live via MCP — no local caching of docs content.
- **DevForum**: Public Discourse API — community-generated content, cross-reference with official docs.

## Development Setup

After cloning, enable the project git hooks:

```bash
git config core.hooksPath .githooks
```

This wires up automatic version bumping — the pre-commit hook bumps the patch version in `plugin.json` and `marketplace.json` on the first code commit of each branch.

## Contributing

Want to add Bloxus support for another AI tool? See [CONTRIBUTING.md](./CONTRIBUTING.md) for the edition structure, parity requirements, and submission process.
Expand Down
21 changes: 21 additions & 0 deletions scripts/bump-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');

const root = path.join(__dirname, '..');
const files = [
path.join(root, '.claude-plugin', 'plugin.json'),
path.join(root, '.claude-plugin', 'marketplace.json'),
];

const pluginData = JSON.parse(fs.readFileSync(files[0], 'utf8'));
const current = pluginData.version;
const [major, minor, patch] = current.split('.').map(Number);
const next = `${major}.${minor}.${patch + 1}`;

for (const file of files) {
const content = fs.readFileSync(file, 'utf8');
fs.writeFileSync(file, content.replace(`"version": "${current}"`, `"version": "${next}"`));
}

console.log(`${current} → ${next}`);
Loading