Skip to content

Commit 45d2e54

Browse files
committed
goodnight.sh: remove hook that auto-runs self -- turns out bad idea!
...because updating nightly should NOT be done automatically after a stacked-rebase is performed here; it should be done manually, ideally after pushing current branch & verifying that CI passes.
1 parent b3a6239 commit 45d2e54

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

goodnight.sh

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,11 @@ else
1919
git push -f origin nightly
2020
fi
2121

22-
# create a git hook for this repo
23-
# that will auto-run this goodnight.sh script
24-
# after a stacked-rebase is finished in this repo.
2522
POST_STACKED_REBASE_HOOK_PATH=".git/hooks/post-stacked-rebase"
2623

27-
cat > "$POST_STACKED_REBASE_HOOK_PATH" <<'EOF'
28-
#!/bin/sh
29-
30-
# DO NOT EDIT THIS FILE MANUALLY
31-
# AUTO-GENERATED BY GIT-STACKED-REBASE's goodnight.sh script.
32-
33-
DIRNAME="$(dirname $0)"
34-
35-
GOODNIGHT_SCRIPT="$(realpath $DIRNAME/../../goodnight.sh)"
36-
37-
sh "$GOODNIGHT_SCRIPT"
38-
EOF
39-
40-
chmod +x "$POST_STACKED_REBASE_HOOK_PATH"
24+
# BACKWARDS FIX FOR PREVIOUS VERSIONS:
25+
# remove the bad script:
26+
if grep "AUTO-GENERATED BY GIT-STACKED-REBASE's goodnight.sh script." "$POST_STACKED_REBASE_HOOK_PATH" >/dev/null 2>&1; then
27+
echo "bad post-rebase script found (previously generated by goodnight.sh), removing."
28+
rm "$POST_STACKED_REBASE_HOOK_PATH";
29+
fi

0 commit comments

Comments
 (0)