diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 4027edbcef8..a50665de94f 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -20,8 +20,8 @@ else gitDeployReason='Automated Weekly Re-Sync' fi -for luaFile in $luaFiles -do +allModulesDeployed=true +for luaFile in $luaFiles; do if [[ -n "$1" ]]; then luaFile="./$luaFile" fi @@ -30,8 +30,7 @@ do [[ $fileContents =~ $pat ]] - if [[ "${BASH_REMATCH[1]}" == "" ]] - then + if [[ "${BASH_REMATCH[1]}" == "" ]]; then echo '...skipping - no magic comment found' else wiki="${BASH_REMATCH[1]}" @@ -49,8 +48,7 @@ do wikiApiUrl="${WIKI_BASE_URL}/${wiki}/api.php" ckf="cookie_${wiki}.ck" - if [[ ${loggedin[${wiki}]} != 1 ]] - then + if [[ ${loggedin[${wiki}]} != 1 ]]; then # Login echo "...logging in on \"${wiki}\"" loginToken=$( @@ -120,14 +118,20 @@ do echo "DEBUG: ...${rawResult}" if [[ "${result}" == "Success" ]]; then echo "...${result}" + echo '...done' else - exit 1 + echo "...failed to deploy" + allModulesDeployed=false fi - echo '...done' # Don't get rate limited sleep 4 fi + + if [ "$allModulesDeployed" != true ]; then + echo "DEBUG: Some modules were not deployed!" + exit 1 + fi done rm -f cookie_*