diff --git a/build_clean_linux64.sh b/build_clean_linux64.sh index 1464186d..7fa5d429 100755 --- a/build_clean_linux64.sh +++ b/build_clean_linux64.sh @@ -86,11 +86,21 @@ echo "client dir hash: $CLIENTDIRHASH" CLIENTDISTHASH=$(<"$basepath/Artifacts/clientdist/_githash_client.txt") echo "client dist hash: $CLIENTDISTHASH" -#if test $CLIENTDISTHASH != $CLIENTDIRHASH -#then -# echo "Invalid client hash! Please rebuild client!" -# exit 1 -#fi +if test "$CLIENTDISTHASH" != "$CLIENTDIRHASH" +then + echo "" + echo "Client artifact is outdated — rebuilding automatically..." + echo " Artifact built from: $CLIENTDISTHASH" + echo " Current Client source: $CLIENTDIRHASH" + echo "" + "$basepath/Artifacts/build_client_clean.sh" + CLIENTDISTHASH=$(<"$basepath/Artifacts/clientdist/_githash_client.txt") + if test "$CLIENTDISTHASH" != "$CLIENTDIRHASH" + then + echo "ERROR: Client rebuild did not produce matching hash!" + exit 1 + fi +fi cd "$basepath"