Compare commits

...

2 commits

Author SHA1 Message Date
387a6125e5
also this 2024-06-18 13:35:37 +02:00
3874459e4f
release alpga 2 2024-06-18 13:32:37 +02:00
6 changed files with 13 additions and 5 deletions

View file

@ -1 +1 @@
no changes updater

View file

@ -1 +1 @@
{"label": "0.9-alpha.2", "id": 2, "timestamp": 1718614497, "file": "realweather-0.9-SNAPSHOT.jar", "sha256": "131f03c7f4407ee874f5a05419639fad8160a2975749916cdbbb185b62dd55c7"} {"label": "0.9-alpha.2", "id": 3, "timestamp": 1718710352, "file": "realweather-0.9-alpha.2.jar", "sha256": "5a44c0f430325f5d66ab16bfe155d231c59e2d3829ecd60b5e9c1f83578695f0"}

Binary file not shown.

View file

@ -1 +1 @@
{"label": "0.9-alpha.2", "id": 2, "timestamp": 1718614497, "file": "realweather-0.9-SNAPSHOT.jar", "sha256": "131f03c7f4407ee874f5a05419639fad8160a2975749916cdbbb185b62dd55c7"} {"label": "0.9-alpha.2", "id": 3, "timestamp": 1718710352, "file": "realweather-0.9-alpha.2.jar", "sha256": "5a44c0f430325f5d66ab16bfe155d231c59e2d3829ecd60b5e9c1f83578695f0"}

View file

@ -111,6 +111,11 @@ def write_metadata(channel: str, metadata: dict):
with open(filepath, 'w') as file: with open(filepath, 'w') as file:
file.write(metadata) file.write(metadata)
def commit_and_push(channel: str, version: str):
os.system('git add .')
os.system(f'git commit -m "[releaser] Release {version} on {channel}"')
os.system('git push')
# other # other
def confirm(prompt: str) -> bool: def confirm(prompt: str) -> bool:
@ -120,7 +125,7 @@ def confirm(prompt: str) -> bool:
def hash_file(filepath: str) -> str: def hash_file(filepath: str) -> str:
with open(filepath, 'rb') as file: with open(filepath, 'rb') as file:
return sha256(file.read()).hexdigest() return sha256(file.read()).hexdigest()
# main # main
def main(): def main():
@ -168,7 +173,10 @@ def main():
except FileNotFoundError: except FileNotFoundError:
pass pass
print("Done, don't forget to commit and push") if confirm("Commit and push?"):
commit_and_push(channel, version)
print("Done")
if __name__ == "__main__": if __name__ == "__main__":
main() main()