mirror of
https://github.com/Dasemu/umami-analytics-mcp.git
synced 2026-11-26 15:26:07 +00:00
chore: bootstrap Claude setup
Add root CLAUDE.md, docs/, LESSONS.md, .env.example, project hooks (.claude/settings.json) and CI workflows (lint/test + versioning), per the standard repo bootstrap. No lint/test tooling exists yet, so hooks and CI only run a py_compile sanity check; CI/versioning target the development/main branch convention even though development does not exist yet. Deployment stays on Nixpacks for now (flagged in LESSONS.md pending a decision on migrating to the standard LXC/VPS+systemd setup). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b131f78870
commit
1153efcc33
10 files changed
+222
No files matched your search
@@ -0,0 +1,26 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [development]
|
||||
push:
|
||||
branches: [development, main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
cache: "pip"
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
# No linter or test suite is configured yet; this is a basic sanity check
|
||||
# that the source at least compiles.
|
||||
- name: Compile check
|
||||
run: python -m py_compile server.py
|
||||
@@ -0,0 +1,63 @@
|
||||
name: Version
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [development, main]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
bump:
|
||||
if: github.actor != 'github-actions[bot]'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Bump version
|
||||
run: |
|
||||
set -euo pipefail
|
||||
current=$(cat VERSION)
|
||||
IFS=. read -r major minor patch <<< "$current"
|
||||
|
||||
if [ "${{ github.ref_name }}" = "development" ]; then
|
||||
patch=$((patch + 1))
|
||||
else
|
||||
# main: PATCH+1 for a direct hotfix push, MINOR+1/PATCH=0 when every
|
||||
# commit in this push came from development (an approved PR merge).
|
||||
merge_base=$(git merge-base origin/development HEAD 2>/dev/null || echo "")
|
||||
before="${{ github.event.before }}"
|
||||
if [ -n "$merge_base" ] && [ -n "$before" ] && [ "$before" != "0000000000000000000000000000000000000000" ] \
|
||||
&& git merge-base --is-ancestor "$before" origin/development 2>/dev/null; then
|
||||
minor=$((minor + 1))
|
||||
patch=0
|
||||
else
|
||||
patch=$((patch + 1))
|
||||
fi
|
||||
fi
|
||||
|
||||
new_version="$major.$minor.$patch"
|
||||
echo "$new_version" > VERSION
|
||||
git add VERSION
|
||||
git commit -m "chore(release): v$new_version [skip ci]"
|
||||
git tag "v$new_version"
|
||||
|
||||
- name: Push changes
|
||||
run: git push origin HEAD:${{ github.ref_name }} --follow-tags
|
||||
|
||||
- name: Merge main back into development
|
||||
if: github.ref_name == 'main'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
git fetch origin development
|
||||
git checkout development
|
||||
git merge --no-edit origin/main
|
||||
git push origin development
|
||||
Reference in new issue
Block a user