tts-voice-creator-clone-and.../scripts/install-hooks.sh
mARTin-B78 06ed33ca67 Add release automation: version bump script and pre-commit changelog hook
scripts/release.py:
  - --patch/--minor/--major flag bumps VERSION file
  - Renames [Unreleased] → [x.y.z] — date in CHANGELOG.md
  - Inserts fresh [Unreleased] section + correct compare links
  - Commits + creates annotated git tag
  - --dry-run flag for preview without writes
  - Prints git push + GitHub Releases URL on completion

scripts/hooks/pre-commit:
  - Warns (exit 0, non-blocking) when source files are staged but
    CHANGELOG.md or VERSION are not staged
  - Already installed in .git/hooks/

scripts/install-hooks.sh:
  - One-liner to install hooks after a fresh clone

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-29 14:14:41 +02:00

11 lines
370 B
Bash

#!/usr/bin/env bash
# Run once after cloning: bash scripts/install-hooks.sh
# Copies the project's git hooks into .git/hooks/
set -e
REPO_ROOT="$(git rev-parse --show-toplevel)"
HOOKS_SRC="$REPO_ROOT/scripts/hooks"
HOOKS_DST="$REPO_ROOT/.git/hooks"
cp "$HOOKS_SRC/pre-commit" "$HOOKS_DST/pre-commit"
chmod +x "$HOOKS_DST/pre-commit"
echo "✓ Installed pre-commit hook"