fix: Properly manager versions on failure

This commit is contained in:
Sayantan Santra 2023-07-01 22:43:52 -05:00
parent 65820f27bf
commit 481e42d32c
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F

View file

@ -92,6 +92,7 @@ check_flag=false
# Get inside the working directory # Get inside the working directory
cd "$WDIR" cd "$WDIR"
echo "$(date) | Starting check..." echo "$(date) | Starting check..."
cp verions.json versions.json.old
# Fetch all the dependencies # Fetch all the dependencies
try=0 try=0
@ -253,7 +254,8 @@ if [ $error == 1 ]; then
-d "$MESSAGE" \ -d "$MESSAGE" \
"$NTFY_URL/$NTFY_TOPIC" "$NTFY_URL/$NTFY_TOPIC"
fi fi
mv versions.json versions.json.bk mv versions.json versions.json.fail
mv versions.json.old versions.json
exit 4 exit 4
fi fi