diff options
author | Tobias Schramm <tobleminer@gmail.com> | 2018-06-30 15:11:15 +0200 |
---|---|---|
committer | Tobias Schramm <tobleminer@gmail.com> | 2018-06-30 15:14:36 +0200 |
commit | b50b3c8114dde20f61d70fe24c553756563dfb7d (patch) | |
tree | 0bfd5a8f3043381a2274f9e20b5c08c1224a0f5b | |
parent | 609a24d2dc54dcd4f5d413dfdad805b3dddae862 (diff) |
Use git exit code for cache invalidation
[skip ci]
-rwxr-xr-x | update-git.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/update-git.sh b/update-git.sh index b05f4b9..31966ca 100755 --- a/update-git.sh +++ b/update-git.sh @@ -20,9 +20,11 @@ function update() { cd gluon set +e LOCAL_REF=$(git rev-parse HEAD) + GIT_EXIT=$? + set -e cd .. - if [[ $? -ne 0 || $REMOTE_REF != "$LOCAL_REF" ]]; then + if [[ $GIT_EXIT -ne 0 || $REMOTE_REF != "$LOCAL_REF" ]]; then echo "$REMOTE_REF != $LOCAL_REF, updating" update fi |