generate-release-meta: Support customizing the base URL
Needed for RHCOS.
@@ -25,7 +25,7 @@ def ensure_dup(inp, out, inp_key, out_key):
def url_builder(stream, version, arch, path):
- return f"https://builds.coreos.fedoraproject.org/prod/streams/{stream}/builds/{version}/{arch}/{path}"
+ return f"{args.stream_baseurl}/{stream}/builds/{version}/{arch}/{path}"
def get_extension(path, modifier, arch):
@@ -35,6 +35,7 @@ def get_extension(path, modifier, arch):
parser = ArgumentParser()
parser.add_argument("--workdir", help="cosa workdir")
parser.add_argument("--build-id", help="build id")
+parser.add_argument("--stream-baseurl", help="Prefix URL for stream content", default="https://builds.coreos.fedoraproject.org/prod/streams")
parser.add_argument("--output", help="Output to file; default is build directory")
parser.add_argument("url", metavar='URL', help="URL to a coreos-assembler meta.json", default=[], nargs='*')
args = parser.parse_args()
