mirror of
https://github.com/Dasemu/VimmLoader.git
synced 2026-11-26 15:26:06 +00:00
chore: bootstrap Claude setup
Add CLAUDE.md, LESSONS.md, VERSION, .env.example, .claude/settings.json hooks, and CI/version workflows following the standard repo bootstrap. No linter or test suite exists yet; checks are limited to a Python syntax check (py_compile) in both the Stop hook and CI. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
91d0640dd6
commit
dc189657eb
8 files changed
+165
No files matched your search
@@ -0,0 +1,25 @@
|
||||
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.x"
|
||||
cache: "pip"
|
||||
|
||||
- run: pip install -r requirements.txt
|
||||
|
||||
# No linter or test suite exists in this repo yet; this is the only
|
||||
# automated check currently available (catches syntax errors).
|
||||
- name: Syntax check
|
||||
run: python -m py_compile run.py generator.py
|
||||
@@ -0,0 +1,74 @@
|
||||
name: Version Bump
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [development, main]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
concurrency:
|
||||
group: version-bump-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
bump:
|
||||
if: >-
|
||||
github.actor != 'github-actions[bot]' &&
|
||||
!contains(github.event.head_commit.message, '[skip ci]')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.ref_name }}
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
- name: Read current version
|
||||
id: current
|
||||
run: |
|
||||
if [ -f VERSION ]; then
|
||||
echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "version=0.1.0" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Compute new version
|
||||
id: bump
|
||||
run: |
|
||||
IFS='.' read -r MAJOR MINOR PATCH <<< "${{ steps.current.outputs.version }}"
|
||||
if [ "${{ github.ref_name }}" = "development" ]; then
|
||||
# Every push to development bumps PATCH.
|
||||
PATCH=$((PATCH + 1))
|
||||
else
|
||||
git fetch origin development
|
||||
if git merge-base --is-ancestor origin/development HEAD; then
|
||||
# main's new tip already contains development's tip: an
|
||||
# approved development -> main PR. Bump MINOR, reset PATCH.
|
||||
MINOR=$((MINOR + 1))
|
||||
PATCH=0
|
||||
else
|
||||
# Direct hotfix push to main.
|
||||
PATCH=$((PATCH + 1))
|
||||
fi
|
||||
fi
|
||||
echo "version=$MAJOR.$MINOR.$PATCH" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Write VERSION and commit
|
||||
run: |
|
||||
echo "${{ steps.bump.outputs.version }}" > VERSION
|
||||
git add VERSION
|
||||
git commit -m "chore(release): v${{ steps.bump.outputs.version }} [skip ci]"
|
||||
git push origin HEAD:${{ github.ref_name }}
|
||||
|
||||
- name: Merge main back into development
|
||||
if: github.ref_name == 'main'
|
||||
run: |
|
||||
git fetch origin development
|
||||
git checkout development
|
||||
git merge --no-edit origin/main
|
||||
git push origin development
|
||||
Reference in new issue
Block a user