Update 'updater/git.py'
This commit is contained in:
parent
0e37f7ad67
commit
5a182c3b49
1 changed files with 2 additions and 1 deletions
|
@ -5,7 +5,7 @@ user_name = 'Updater Robot'
|
||||||
user_email = 'robot@nowhere.invalid'
|
user_email = 'robot@nowhere.invalid'
|
||||||
|
|
||||||
|
|
||||||
def add_commit(directory: str, message: str):
|
def add_commit_push(directory: str, message: str):
|
||||||
diff = subprocess.run(['git', 'diff', '--cached', '--exit-code'], capture_output=True, text=True)
|
diff = subprocess.run(['git', 'diff', '--cached', '--exit-code'], capture_output=True, text=True)
|
||||||
if diff.returncode != 0:
|
if diff.returncode != 0:
|
||||||
status = subprocess.run(['git', 'status'], capture_output=True, text=True)
|
status = subprocess.run(['git', 'status'], capture_output=True, text=True)
|
||||||
|
@ -14,3 +14,4 @@ def add_commit(directory: str, message: str):
|
||||||
subprocess.run(['git', 'add', '--all', directory], check=True)
|
subprocess.run(['git', 'add', '--all', directory], check=True)
|
||||||
subprocess.run(['git', '-c', 'user.name={}'.format(user_name), '-c', 'user.email={}'.format(user_email),
|
subprocess.run(['git', '-c', 'user.name={}'.format(user_name), '-c', 'user.email={}'.format(user_email),
|
||||||
'commit', '--message', message])
|
'commit', '--message', message])
|
||||||
|
subprocess.run(['git', 'push'])
|
||||||
|
|
Loading…
Reference in a new issue