From a40d08209b71d37240f7a5bf8338fd52bf02f9ac Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 8 Jan 2022 16:13:14 +0100 Subject: [PATCH] exit scripts if the build fails --- Publish.bat | 2 +- Publish.sh | 2 +- Run.bat | 2 +- Run.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Publish.bat b/Publish.bat index ca137c7..6e2fff9 100644 --- a/Publish.bat +++ b/Publish.bat @@ -2,7 +2,7 @@ rem move to the script directory cd /d "%~dp0" rem build the mod -dotnet build +dotnet build || exit /b rem zip the mod cd ./bin/Debug/net6.0 for /F %%p in ('dir /b "*.dll"') do (set file=%%p) diff --git a/Publish.sh b/Publish.sh index 5ba17c8..62425c4 100644 --- a/Publish.sh +++ b/Publish.sh @@ -2,7 +2,7 @@ # move to the script directory cd "$(dirname "$0")" # build the mod -dotnet build +dotnet build || exit # zip the mod cd ./bin/Debug/net6.0 file=$(find *.dll -print) diff --git a/Run.bat b/Run.bat index 266e1a5..e125f06 100644 --- a/Run.bat +++ b/Run.bat @@ -2,7 +2,7 @@ rem move to the script directory cd /d "%~dp0" rem build the mod -dotnet build +dotnet build || exit /b rem copy the mod to the mods folder robocopy ./bin/Debug/net6.0/ "%LOCALAPPDATA%/Tiny Life/Mods" /e /is rem run the game diff --git a/Run.sh b/Run.sh index b1858b5..c9a3c80 100644 --- a/Run.sh +++ b/Run.sh @@ -2,7 +2,7 @@ # move to the script directory cd "$(dirname "$0")" # build the mod -dotnet build +dotnet build || exit # copy the mod to the mods folder cp -r ./bin/Debug/net6.0/* "$HOME/.local/share/Tiny Life/Mods" # run the game