[olympic/util] Make pkg-gba script check return code of subprocesses
All checks were successful
Build / build (push) Successful in 1m14s
All checks were successful
Build / build (push) Successful in 1m14s
This commit is contained in:
parent
aad4b8a44c
commit
8c6b2234ec
@ -17,6 +17,10 @@ os = platform.system().lower()
|
||||
arch = platform.machine()
|
||||
host_env = f'{os}-{arch}'
|
||||
|
||||
def run(args: list[str]):
|
||||
if subprocess.run(args).returncode != 0:
|
||||
sys.exit(1)
|
||||
|
||||
# get current build type
|
||||
with open(".current_build", "r") as f:
|
||||
current_build = f.readlines()[0]
|
||||
@ -31,9 +35,9 @@ project_gba = f'{project_name}.gba'
|
||||
project_manifest = f'{project_name.lower()}-manifest.json'
|
||||
|
||||
shutil.copyfile(project_bin, project_gba)
|
||||
subprocess.run([
|
||||
run([
|
||||
f'{bin}/{project_name.lower()}-pack',
|
||||
'-src', project_dir,
|
||||
'-rom-bin', project_gba,
|
||||
'-manifest', project_manifest])
|
||||
subprocess.run(['gbafix', project_gba])
|
||||
run(['gbafix', project_gba])
|
||||
|
Loading…
x
Reference in New Issue
Block a user