summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-07-11 20:38:59 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-07-11 20:58:27 +0900
commitcd781089d2be66c79837f59355b0710f7bb09b53 (patch)
tree1568e2ab4a5411321e9eb20962a8c23161b55e44
parent415faadb91295e13c2b5bdec8fb8f41270b5d86d (diff)
downloadbuildstream-cd781089d2be66c79837f59355b0710f7bb09b53.tar.gz
_artifactcache/pushreceive.py: Changing up the bst-artifact-receive options
Make the repo an argument, so that it bails out if not specified.
-rw-r--r--buildstream/_artifactcache/pushreceive.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/buildstream/_artifactcache/pushreceive.py b/buildstream/_artifactcache/pushreceive.py
index 820400380..fae81a7c2 100644
--- a/buildstream/_artifactcache/pushreceive.py
+++ b/buildstream/_artifactcache/pushreceive.py
@@ -320,12 +320,14 @@ class OSTreePusher(object):
ssh_cmd += ['-l', self.remote_user]
if self.remote_port:
ssh_cmd += ['-p', self.remote_port]
- ssh_cmd += [self.remote_host, 'bst-artifact-receive',
- '--repo=%s' % self.remote_path]
+
+ ssh_cmd += [self.remote_host, 'bst-artifact-receive']
if self.verbose:
ssh_cmd += ['--verbose']
if self.debug:
ssh_cmd += ['--debug']
+ ssh_cmd += [self.remote_path]
+
logging.info('Executing {}'.format(' '.join(ssh_cmd)))
self.ssh = subprocess.Popen(ssh_cmd, stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
@@ -583,10 +585,10 @@ def push(repo, remote, branch, output):
@click.command(short_help="Receive pushed artifacts over ssh")
-@click.option('--repo', help="Repository path to add artifacts to")
@click.option('--verbose', '-v', is_flag=True, default=False, help="Verbose mode")
@click.option('--debug', '-d', is_flag=True, default=False, help="Debug mode")
-def receive_main(repo, verbose, debug):
+@click.argument('repo')
+def receive_main(verbose, debug, repo):
"""A BuildStream sister program for receiving artifacts send to a shared artifact cache
"""
loglevel = logging.WARNING