aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-03 16:52:48 +0200
committerStefan Boberg <[email protected]>2021-09-03 16:52:48 +0200
commit4af4831763892b7f4e7987e26a40ddafa341e3b2 (patch)
treecd03387c4ca28433bec1cb66b9b02018e9c797c4 /scripts
parentImprovements to build deploy scripts (diff)
downloadzen-4af4831763892b7f4e7987e26a40ddafa341e3b2.tar.xz
zen-4af4831763892b7f4e7987e26a40ddafa341e3b2.zip
Make sure build scripts fails if the devenv build fails
Diffstat (limited to 'scripts')
-rw-r--r--scripts/deploybuild.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/scripts/deploybuild.py b/scripts/deploybuild.py
index 1d9d5d839..c2fba672d 100644
--- a/scripts/deploybuild.py
+++ b/scripts/deploybuild.py
@@ -9,9 +9,14 @@ import subprocess
from peafour import P4
from colorama import Fore, Back, Style
+# Jazzy helpers
+
def jazz_print(tag, detail = ""):
print(f"{Fore.WHITE}{Style.BRIGHT}||> {tag}{Style.RESET_ALL} {detail}")
+def jazz_fail(tag, detail = ""):
+ print(f"{Fore.RED}{Style.BRIGHT}||> {tag}{Style.RESET_ALL} {detail}")
+
colorama.init()
origcwd = os.getcwd()
@@ -27,7 +32,7 @@ engineroot = args.root
if not os.path.isfile(os.path.join(engineroot, "RunUAT.bat")):
print(f"{Fore.RED}Not a valid UE5 engine root directory: '{engineroot}'")
print(Style.RESET_ALL)
- exit()
+ exit(1)
# Establish root of zen tree
@@ -44,7 +49,11 @@ vs_path = vswhere.get_latest_path() # can also specify prerelease=True
jazz_print("BUILDING CODE", f"using VS root: {vs_path}")
devenv_path = os.path.join(vs_path, "Common7\\IDE\\devenv.com")
-subprocess.run([devenv_path, "/build", "Release", "zen.sln"])
+try:
+ subprocess.run([devenv_path, "/build", "Release", "zen.sln"], check=True)
+except:
+ jazz_fail("Build failed!")
+ exit(1)
# Upload symbols etc to Sentry
@@ -60,7 +69,7 @@ p4info = P4.info().run()
if not os.path.samefile(p4info.clientRoot, engineroot):
print(f"{Fore.RED}Could not find P4 client for UE5 engine root directory '{engineroot}'")
print(Style.RESET_ALL)
- exit()
+ exit(1)
# check out the binaries