Skip to content

Commit 1b6ad46

Browse files
authored
fix: Check if new commits are available in update.sh (#26631)
1 parent ad32fec commit 1b6ad46

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

update.sh

+9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#!/usr/bin/env bash
22
cd "$(dirname "$0")"
33

4+
NEW_COMMITS="$(git rev-list HEAD...origin/"$(git branch --show-current)" --count)"
5+
6+
if [ "$NEW_COMMITS" -gt "0" ]; then
7+
echo "Update available!"
8+
else
9+
echo "No update available."
10+
exit 0
11+
fi
12+
413
NEED_RESTART=0
514

615
OSNAME="$(uname -s)"

0 commit comments

Comments
 (0)