From d570a7db21cbe2f1c537ea6a55fe1f3ceba9a1b8 Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Sun, 18 Dec 2022 18:33:56 -0800 Subject: [PATCH] Check for errors on windows release scripts --- release_all.bat | 16 +++++++++++----- update_server.bat | 3 ++- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/release_all.bat b/release_all.bat index 88cd26b..084958b 100644 --- a/release_all.bat +++ b/release_all.bat @@ -1,9 +1,15 @@ -git push -call build_release.bat -call update_server.bat -tar.exe -a -c -f releases\flight-nonumber.zip flight_release.exe loaded LICENSE.txt +git push || goto :error +call build_release.bat || goto :error +call update_server.bat || goto :error +tar.exe -a -c -f releases\flight-nonumber.zip flight_release.exe loaded LICENSE.txt || goto :error echo "Now test flight-nonumber and make sure it works. Once everything is confirmed to be working:" echo "1. Increment the GIT_RELEASE_TAG in buildsettings.h" echo "2. Add everything to git and commit" echo "3. Tag the new commit the _exact same_ as the previously mentioned GIT_RELEASE_TAG" -echo "4. Push everything, then update all the servers (@TODO make this a script that works for multiple servers)" \ No newline at end of file +echo "4. Push everything, then update all the servers (@TODO make this a script that works for multiple servers)" + +goto :EOF + +:error +echo Failed to release with error %errorlevel% +exit /b %errorlevel% \ No newline at end of file diff --git a/update_server.bat b/update_server.bat index a63d61a..f718de7 100644 --- a/update_server.bat +++ b/update_server.bat @@ -1 +1,2 @@ -ssh astris "cd flight; git pull; ./linux_server_install.sh" \ No newline at end of file +@echo off +ssh astris "cd flight || exit 1 ; git pull || exit 1 ; ./linux_server_install.sh || exit 1 ; echo Successfully updated" || exit /b %errorlevel% \ No newline at end of file