Skip to content

Commit

Permalink
Change status messages in create-release.py
Browse files Browse the repository at this point in the history
  • Loading branch information
IAmMoltony committed Sep 29, 2023
1 parent d6dcfee commit 43d3a77
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions create-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import shutil
import pathlib

# TODO this code needs cleanup...

def get_game_version():
version = ""
prefix = ""
Expand All @@ -14,7 +16,7 @@ def get_game_version():
data_split = data.split('\n')
for i in range(4):
line = data_split[i]
if i == 0 or i == 1:
if i == 0 or i == 1: # what?
version += f"{line}."
elif i == 2:
version += line
Expand All @@ -26,7 +28,7 @@ def main():
pathlib.Path("releases").mkdir(parents=True, exist_ok=True)

parser = argparse.ArgumentParser()
parser.add_argument("--noclean", help="don't run `make clean' before building", action="store_true")
parser.add_argument("--noclean", help="don't remove binaries before building", action="store_true")
parser.add_argument("--quiet", help="don't display output (except for errors)", action="store_true")
args = parser.parse_args()

Expand All @@ -37,13 +39,13 @@ def main():
if be_quiet:
subprocess.run(["/bin/make", "clean"], stdout=subprocess.DEVNULL)
else:
print("Running `make clean'")
print("Cleaning binaries")
subprocess.run(["/bin/make", "clean"])

if be_quiet:
subprocess.run(["/bin/make"], check=True, stdout=subprocess.DEVNULL)
else:
print("Running `make'")
print("Compiling game")
subprocess.run(["/bin/make"], check=True)

shutil.copyfile("bin/ds-craft.nds", f"releases/ds-craft-{get_game_version()}.nds")
Expand Down

0 comments on commit 43d3a77

Please sign in to comment.