diff --git a/run.sh b/run.sh index dbc5e37..2645589 100755 --- a/run.sh +++ b/run.sh @@ -37,19 +37,15 @@ do continue fi - if [ $current_commit == $latest_commit ]; then - # Latest commit isn't different than the current one - sleep $delay - continue - fi - - echo "Checking out $latest_commit..." - git reset --hard - git checkout $latest_commit -f - if [ $? -ne 0 ]; then - echo "Git checkout failed." - sleep $delay - continue + if [ $current_commit != $latest_commit ]; then + echo "Checking out $latest_commit..." + git reset --hard >> /dev/null + git checkout $latest_commit -f + if [ $? -ne 0 ]; then + echo "Git checkout failed." + sleep $delay + continue + fi fi checkout_version=`cat version`