diff options
author | Andy Doan <andy.doan@linaro.org> | 2014-08-11 14:06:49 -0500 |
---|---|---|
committer | Andy Doan <andy.doan@linaro.org> | 2014-08-11 14:06:49 -0500 |
commit | c0c01b48c404a92887cc542db13c0f0bd8392c15 (patch) | |
tree | 326fbc3d127d6d9fe2a4b761aee2551cf8c5b590 | |
parent | fa2d809a4eb4532bed7bdc19c4de4358ca8b7105 (diff) |
allow configurable publishing API server
Change-Id: Ie6c77c2f3789da869a0fd1428120182b809a75e5
-rwxr-xr-x | linaro-cp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linaro-cp.py b/linaro-cp.py index aeefe2e..bc1b272 100755 --- a/linaro-cp.py +++ b/linaro-cp.py @@ -6,8 +6,6 @@ import os import pycurl import sys -# Snapshots base URL -snapshots_url = 'http://snapshots.linaro.org/' # Public artifacts BUILD-INFO.txt build_info = 'Format-Version: 0.5\n\nFiles-Pattern: *\nLicense-Type: open\n' @@ -16,6 +14,8 @@ def main(): parser = argparse.ArgumentParser( description='Copy file(s) from source to destination') parser.add_argument('-k', '--key', help='key used for the copy') + parser.add_argument('--server', default='http://snapshots.linaro.org/', + help='Publishing API server. default=%(default)s') parser.add_argument('src', help='source file(s) to copy') parser.add_argument('dst', help='destination to copy the file(s)') @@ -43,7 +43,7 @@ def main(): for f in files: src_file = os.path.join(root, f) dst_file = os.path.join(root, f)[len(src_dir):] - dst_file = '%s%s%s' % (snapshots_url, dst, dst_file) + dst_file = '%s%s%s' % (arguments.server, dst, dst_file) build_info_file = dst_file.replace(f, 'BUILD-INFO.txt') transfer_queue[dst_file] = src_file transfer_queue[build_info_file] = 'BUILD-INFO.txt' |