diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/remote_build.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/remote_build.py b/scripts/remote_build.py index 5fd62b87f..71b8b500e 100644 --- a/scripts/remote_build.py +++ b/scripts/remote_build.py @@ -73,6 +73,7 @@ def _local(args): parser = argparse.ArgumentParser(description=desc) parser.add_argument("remotehost", help="") parser.add_argument("action", default="build", nargs="?", help="") + parser.add_argument("--commit", default=None, help="Commit to act on") parser.add_argument("--keyfile", default=None, help="SSH key file") args = parser.parse_args(args) @@ -156,6 +157,8 @@ def _local(args): # Run this script on the remote machine _header("Running SSH") + commit = args.commit if args.commit else "origin/main" + remote_zen_dir = "%s_%s" % (os.getlogin(), _get_ip()) print(f"Using zen '~/{remote_zen_dir}'") @@ -166,7 +169,7 @@ def _local(args): *identity, "-tA", host, - f"python3 -u - !remote {_get_ip()} '{remote_zen_dir}' main '{args.action}'", + f"python3 -u - !remote {_get_ip()} '{remote_zen_dir}' {commit} '{args.action}'", stdin=self_file) # If we're bundling, collect zip files from the remote machine @@ -187,7 +190,7 @@ def _remote(args): parser = argparse.ArgumentParser(description=desc) parser.add_argument("ip", help="Host's IP address") parser.add_argument("reponame", help="Repository name clone into and work in") - parser.add_argument("branch", help="Zen branch to operate on") + parser.add_argument("commit", help="Zen commit to operate on") parser.add_argument("action", help="The action to do") args = parser.parse_args(args) @@ -211,7 +214,7 @@ def _remote(args): _run_checked("git", "clean", "-fd") _run_checked("git", "fetch", "origin") - _run_checked("git", "checkout", "origin/" + args.branch) + _run_checked("git", "checkout", args.commit) _header("REMOTE:", f"Performing action '{args.action}'") |