Skip to content

Commit f1cc385

Browse files
committed
Improve script
1 parent 7fa5b8f commit f1cc385

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scripts/conditional-deploy.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ LOCAL=$(git rev-parse @)
1010
REMOTE=$(git rev-parse "$UPSTREAM")
1111
BASE=$(git merge-base @ "$UPSTREAM")
1212

13-
if [ $LOCAL = $REMOTE ]; then
13+
if [ "$LOCAL" = "$REMOTE" ]; then
1414
true
1515
# echo "$(date --utc +%FT%TZ): No changes detected in git"
16-
elif [ $LOCAL = $BASE ]; then
16+
elif [ "$LOCAL" = "$BASE" ]; then
1717
git pull
1818
scripts/deploy.sh
19-
elif [ $REMOTE = $BASE ]; then
19+
elif [ "$REMOTE" = "$BASE" ]; then
2020
echo "$(date --utc +%FT%TZ): Local changes detected, you may need to stash"
2121
else
2222
echo "$(date --utc +%FT%TZ): Git is diverged, this is unexpected."

0 commit comments

Comments
 (0)