Merge LocalMods + config rsync into single command
This commit is contained in:
19
prep
19
prep
@@ -10,7 +10,6 @@ PREPARE_LOCAL = os.path.join(BASE, "prepare_local")
|
|||||||
AUTOGEN = os.path.join(BASE, "scripts", "autogen_config.py")
|
AUTOGEN = os.path.join(BASE, "scripts", "autogen_config.py")
|
||||||
LOCALMODS_DIR = os.path.join(BASE, "LocalMods")
|
LOCALMODS_DIR = os.path.join(BASE, "LocalMods")
|
||||||
|
|
||||||
RSYNC_DEST = "root@barotrauma:/opt/barotrauma/LocalMods/"
|
|
||||||
CONFIG_PATH = os.path.join(BASE, "config_player.xml")
|
CONFIG_PATH = os.path.join(BASE, "config_player.xml")
|
||||||
RSYNC_SSH = "ssh -p 22"
|
RSYNC_SSH = "ssh -p 22"
|
||||||
|
|
||||||
@@ -44,25 +43,17 @@ def main():
|
|||||||
log_ok("config_player.xml generated")
|
log_ok("config_player.xml generated")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
log_info("Step 3/5: Rsyncing LocalMods/ to server...")
|
log_info("Step 3/4: Rsyncing LocalMods + config to server...")
|
||||||
subprocess.run([
|
|
||||||
"rsync", "-avz", "--delete",
|
|
||||||
"-e", RSYNC_SSH,
|
|
||||||
LOCALMODS_DIR + "/", RSYNC_DEST
|
|
||||||
], check=True)
|
|
||||||
log_ok("LocalMods synced")
|
|
||||||
print()
|
|
||||||
|
|
||||||
log_info("Step 4/5: Rsyncing config_player.xml to server...")
|
|
||||||
subprocess.run([
|
subprocess.run([
|
||||||
"rsync", "-avz",
|
"rsync", "-avz",
|
||||||
"-e", RSYNC_SSH,
|
"-e", RSYNC_SSH,
|
||||||
CONFIG_PATH, "root@barotrauma:/opt/barotrauma/config_player.xml"
|
LOCALMODS_DIR + "/", CONFIG_PATH,
|
||||||
|
"root@barotrauma:/opt/barotrauma/"
|
||||||
], check=True)
|
], check=True)
|
||||||
log_ok("config_player.xml synced")
|
log_ok("Synced to server")
|
||||||
print()
|
print()
|
||||||
|
|
||||||
log_info("Step 5/5: Committing...")
|
log_info("Step 4/4: Committing...")
|
||||||
subprocess.run(["git", "add", "-A"], cwd=BASE, check=True)
|
subprocess.run(["git", "add", "-A"], cwd=BASE, check=True)
|
||||||
subprocess.run(["git", "commit", "-m", msg], cwd=BASE, check=True)
|
subprocess.run(["git", "commit", "-m", msg], cwd=BASE, check=True)
|
||||||
log_ok(f"Committed: {msg}")
|
log_ok(f"Committed: {msg}")
|
||||||
|
|||||||
Reference in New Issue
Block a user