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])