Strip archive query strings in bcr_presubmit.py (#1974)
Strips query strings from the source archive of a module to support
modules hosted in GCS buckets. A similar fix was applied to the BCR in
https://github.com/bazelbuild/bazel-central-registry/pull/2261.
diff --git a/buildkite/bazel-central-registry/bcr_presubmit.py b/buildkite/bazel-central-registry/bcr_presubmit.py
index 7cc766d..8bfc6f4 100755
--- a/buildkite/bazel-central-registry/bcr_presubmit.py
+++ b/buildkite/bazel-central-registry/bcr_presubmit.py
@@ -228,7 +228,7 @@
# Download and unpack the source archive to ./output
archive_url = source["url"]
- archive_file = root.joinpath(archive_url.split("/")[-1])
+ archive_file = root.joinpath(archive_url.split("/")[-1].split("?")[0])
output_dir = root.joinpath("output")
bazelci.eprint("* Download and unpack %s\n" % archive_url)
download(archive_url, archive_file)