ci: pre-push-Hook + Installer für lokalen Test-Gate
scripts/git-hooks/pre-push lässt pytest vor jedem Push laufen und bricht bei roten Tests ab — automatischer Regressionsschutz ohne Forgejo-Runner. scripts/install-hooks.sh installiert die versionierten Hooks nach .git/hooks (das selbst nicht versioniert ist). In DEPLOYMENT.md Teil 4.0 dokumentiert. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
284228b5fa
commit
7a0cf0abb4
3 changed files with 53 additions and 0 deletions
17
scripts/install-hooks.sh
Executable file
17
scripts/install-hooks.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env bash
|
||||
# Installiert die versionierten Git-Hooks aus scripts/git-hooks/ nach .git/hooks/.
|
||||
# Nach jedem frischen Clone einmal ausfuehren: bash scripts/install-hooks.sh
|
||||
set -euo pipefail
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
SRC="$ROOT/scripts/git-hooks"
|
||||
DST="$ROOT/.git/hooks"
|
||||
|
||||
mkdir -p "$DST"
|
||||
for hook in "$SRC"/*; do
|
||||
name="$(basename "$hook")"
|
||||
cp "$hook" "$DST/$name"
|
||||
chmod +x "$DST/$name"
|
||||
echo "✓ installiert: $name"
|
||||
done
|
||||
echo "Fertig. Hooks aktiv unter $DST"
|
||||
Loading…
Add table
Add a link
Reference in a new issue