patch.py now commits change to currentHash

This commit is contained in:
cyian-1756 2018-06-07 07:44:55 -04:00
parent 5c0260fb2a
commit c671cb3ec5

View File

@ -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)
update_hash(file_hash)
subprocess.call(['git', 'add', '-u'])
subprocess.call(['git', 'commit', '-m', commitMessage])
subprocess.call(['git', 'tag', nextVersion])