diff --git a/scripts/deploy.fish b/scripts/deploy.fish index bdbe1dc..b7e2219 100644 --- a/scripts/deploy.fish +++ b/scripts/deploy.fish @@ -86,7 +86,7 @@ echo " ✓ git alias 'init' gesetzt (führt copilot-bootstrap.sh automatisch au git config --global alias.copilot-update '!~/.local/bin/copilot-update.sh' echo " ✓ git alias 'copilot-update' gesetzt (aktualisiert Templates & Prompts)" -# ── 7. post-merge Hook für dieses Setup-Repo ───────────────────────────────── +# ── 7. post-merge + post-commit Hook für dieses Setup-Repo ─────────────────── set SELF_HOOKS_DIR $REPO_DIR/.git/hooks if test -d $SELF_HOOKS_DIR echo '#!/usr/bin/env sh @@ -97,6 +97,10 @@ SCRIPT_DIR="$(cd "$(dirname "$0")/../../scripts" && pwd)" bash "$SCRIPT_DIR/deploy.sh"' > $SELF_HOOKS_DIR/post-merge chmod +x $SELF_HOOKS_DIR/post-merge echo " ✓ post-merge Hook im Setup-Repo installiert (auto-deploy nach git pull)" + # post-commit aus git-templates kopieren (History-Logs) + cp $REPO_DIR/git-templates/hooks/post-commit $SELF_HOOKS_DIR/post-commit + chmod +x $SELF_HOOKS_DIR/post-commit + echo " ✓ post-commit Hook im Setup-Repo installiert (History-Logs)" end echo "" diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 9a4f6fa..b514193 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -88,9 +88,10 @@ echo " ✓ git alias 'init' gesetzt (führt copilot-bootstrap.sh automatisch au git config --global alias.copilot-update '!~/.local/bin/copilot-update.sh' echo " ✓ git alias 'copilot-update' gesetzt (aktualisiert Templates & Prompts)" -# ── 7. post-merge Hook für dieses Setup-Repo ───────────────────────────────── +# ── 7. post-merge + post-commit Hook für dieses Setup-Repo ─────────────────── # Nach jedem 'git pull' auf dem Setup-Repo selbst wird deploy.sh automatisch # ausgeführt, sodass Templates immer auf dem neuesten Stand sind. +# post-commit generiert die History-Logs nach jedem Commit. SELF_HOOKS_DIR="$REPO_DIR/.git/hooks" if [[ -d "$SELF_HOOKS_DIR" ]]; then cat > "$SELF_HOOKS_DIR/post-merge" << 'HOOK' @@ -103,6 +104,10 @@ bash "$SCRIPT_DIR/deploy.sh" HOOK chmod +x "$SELF_HOOKS_DIR/post-merge" echo " ✓ post-merge Hook im Setup-Repo installiert (auto-deploy nach git pull)" + # post-commit aus git-templates kopieren (History-Logs) + cp "$REPO_DIR/git-templates/hooks/post-commit" "$SELF_HOOKS_DIR/post-commit" + chmod +x "$SELF_HOOKS_DIR/post-commit" + echo " ✓ post-commit Hook im Setup-Repo installiert (History-Logs)" fi echo ""