Update run.sh

This commit is contained in:
Manevolent 2022-12-17 19:40:12 -07:00 committed by GitHub
parent 8d513d9989
commit fcc956be4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

22
run.sh
View File

@ -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`