We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cf104e commit b3a6239Copy full SHA for b3a6239
goodnight.sh
@@ -10,7 +10,14 @@ set -e
10
#
11
CURR_BRANCH_PUSHED="origin/$(git branch --show)"
12
git branch -f nightly "$CURR_BRANCH_PUSHED"
13
-git push -f origin nightly
+
14
+LOCAL_NIGHTLY="$(git rev-parse nightly)"
15
+REMOTE_NIGHTLY="$(git rev-parse origin/nightly)"
16
+if [ "$LOCAL_NIGHTLY" = "$REMOTE_NIGHTLY" ]; then
17
+ printf "Already up-to-date, skipping push.\n"
18
+else
19
+ git push -f origin nightly
20
+fi
21
22
# create a git hook for this repo
23
# that will auto-run this goodnight.sh script
0 commit comments