Commit 8d7a56bd authored by Aral Balkan's avatar Aral Balkan

Updated deployment script to abort gracefully by decrementing the counter.

parent a10f0cf4
......@@ -9,6 +9,16 @@
set -e
# Aborts the script and decrements the deployment counter
abortGracefully(){
currentDayDeploymentCount=$(( currentDayDeploymentCount - 1 ))
echo "$currentDayDeploymentCount" > "$counterFilePath"
echo "Current deployment count reset to ${currentDayDeploymentCount}"
exit 1
}
dateStamp=$(date "+%Y%m%d")
counterFolderPath="/tmp/better-content"
......@@ -70,7 +80,7 @@ tagMessageMD5=$(md5 -q "$tempTagMessageFilePath")
if [ "$emptyStringMD5" = "$tagMessageMD5" ]; then
# Person deleted the tag message, abort the tag.
echo "\nAborting deployment due to empty tag message.\n"
exit 1
abortGracefully()
else
cat "$tempTagMessageFilePath"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment