mirror of
https://github.com/vvzvlad/vestasync.git
synced 2024-12-26 20:21:00 +03:00
add force push
This commit is contained in:
parent
d32eee4e29
commit
b6bf557f35
@ -221,7 +221,7 @@ def ppush_the_repo(c):
|
|||||||
print("Nothing to commit, exit")
|
print("Nothing to commit, exit")
|
||||||
else:
|
else:
|
||||||
print(f"Error: {e.result.stderr}")
|
print(f"Error: {e.result.stderr}")
|
||||||
c.run('cd /mnt/data/etc/ && git push -u origin master', hide=True)
|
c.run('cd /mnt/data/etc/ && git push --force -u origin master', hide=True)
|
||||||
|
|
||||||
def run_user_cmd(c, file):
|
def run_user_cmd(c, file):
|
||||||
user_cmd_file = "/tmp/user_cmd.sh"
|
user_cmd_file = "/tmp/user_cmd.sh"
|
||||||
@ -259,6 +259,7 @@ def device_update(c):
|
|||||||
create_autogit_systemd(c)
|
create_autogit_systemd(c)
|
||||||
if args.user_cmd is not None:
|
if args.user_cmd is not None:
|
||||||
run_user_cmd(c, args.user_cmd_file)
|
run_user_cmd(c, args.user_cmd_file)
|
||||||
|
ppush_the_repo(c)
|
||||||
print("Update vestasync complete\n")
|
print("Update vestasync complete\n")
|
||||||
|
|
||||||
def device_install(c):
|
def device_install(c):
|
||||||
@ -316,6 +317,7 @@ def device_restore():
|
|||||||
mark_original_restored(c, "restored")
|
mark_original_restored(c, "restored")
|
||||||
if args.user_cmd is not None:
|
if args.user_cmd is not None:
|
||||||
run_user_cmd(c, args.user_cmd_file)
|
run_user_cmd(c, args.user_cmd_file)
|
||||||
|
ppush_the_repo(c)
|
||||||
reboot(c)
|
reboot(c)
|
||||||
print(f"Restore backup complete (hostname {hostname}), rebooting target device..\n")
|
print(f"Restore backup complete (hostname {hostname}), rebooting target device..\n")
|
||||||
except socket.timeout:
|
except socket.timeout:
|
||||||
|
Loading…
Reference in New Issue
Block a user