summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2016-02-09 10:45:19 (GMT)
committerBaserock Gerrit <gerrit@baserock.org>2016-03-01 10:57:06 (GMT)
commit5ba0bb7e765528851dfc6773eada1f7fbad67ddf (patch)
tree9545b73e4bdbe422d429bd9ac4777c19861cf974 /scripts
parent75c628ead451589c0d391f54d115ac32a2dfb7a2 (diff)
downloaddefinitions-5ba0bb7e765528851dfc6773eada1f7fbad67ddf.tar.gz
Allow --trove-host to be specified
Change-Id: Ie04a7979c2591dfdb9ead256620593547020abb0
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/check-unpetrify-refs.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/check-unpetrify-refs.py b/scripts/check-unpetrify-refs.py
index 15ac95c..27792c4 100755
--- a/scripts/check-unpetrify-refs.py
+++ b/scripts/check-unpetrify-refs.py
@@ -31,12 +31,13 @@ a missing or non-existent unpetrify-ref and if it fails to check the remote
'''
strata_dir = "strata"
+trove_host = "git.baserock.org"
aliases = {
- 'baserock:': 'git://git.baserock.org/baserock/',
+ 'baserock:': 'git://%(trove)s/baserock/',
'freedesktop:': 'git://anongit.freedesktop.org/',
'github:': 'git://github.com/',
'gnome:': 'git://git.gnome.org/',
- 'upstream:': 'git://git.baserock.org/delta/'
+ 'upstream:': 'git://%(trove)s/delta/'
}
def ref_exists(remote, ref):
@@ -58,6 +59,14 @@ def load_yaml_file(yaml_file):
return yaml.safe_load(f)
def main(args):
+ global trove_host, aliases
+ opt = next(((i, j.split('=')[1]) for i, j in enumerate(args)
+ if j.startswith("--trove-host=")), None)
+ if opt:
+ trove_host = opt[1]
+ del args[opt[0]]
+ aliases = {k: v % {'trove': trove_host} for k, v in aliases.iteritems()}
+
if args:
strata = args
else: