fix: post-commit Hook im Setup-Repo selbst installieren via deploy.sh
This commit is contained in:
parent
0df0f691cd
commit
55fee83bbd
2 changed files with 11 additions and 2 deletions
|
|
@ -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 ""
|
||||
|
|
|
|||
|
|
@ -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 ""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue