From c671cb3ec52718a0b05a26c446abbfb9b4f040b5 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Thu, 7 Jun 2018 07:44:55 -0400 Subject: [PATCH] patch.py now commits change to currentHash --- patch.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/patch.py b/patch.py index 4c417515..0232ba7d 100644 --- a/patch.py +++ b/patch.py @@ -12,11 +12,13 @@ from hashlib import sha256 message = input('message: ') + def get_ripme_json(): with open('ripme.json') as dataFile: ripmeJson = json.load(dataFile) return ripmeJson + def update_hash(current_hash): ripmeJson = get_ripme_json() with open('ripme.json', 'w') as dataFile: @@ -24,6 +26,7 @@ def update_hash(current_hash): print(ripmeJson["currentHash"]) json.dump(ripmeJson, dataFile, indent=4) + def update_change_list(message): ripmeJson = get_ripme_json() with open('ripme.json', 'w') as dataFile: @@ -72,9 +75,6 @@ dataFile = open("ripme.json", "w") dataFile.write(outputContent) dataFile.close() -subprocess.call(['git', 'add', '-u']) -subprocess.call(['git', 'commit', '-m', commitMessage]) -subprocess.call(['git', 'tag', nextVersion]) print("Building ripme") subprocess.call(["mvn", "clean", "compile", "assembly:single"]) print("Stripping jar") @@ -85,4 +85,7 @@ readFile = openedFile.read() file_hash = sha256(readFile).hexdigest() print("Hash is: {}".format(file_hash)) print("Updating hash") -update_hash(file_hash) \ No newline at end of file +update_hash(file_hash) +subprocess.call(['git', 'add', '-u']) +subprocess.call(['git', 'commit', '-m', commitMessage]) +subprocess.call(['git', 'tag', nextVersion])