Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • bazel/rules_curl
1 result
Show changes
Commits on Source (3)
# [1.0.0-alpha.4](https://git.gitlab.arm.com/bazel/rules_curl/compare/v1.0.0-alpha.3...v1.0.0-alpha.4) (2024-02-07)
### Features
- support overriding destination as a runtime argument ([c07fa31](https://git.gitlab.arm.com/bazel/rules_curl/commit/c07fa31fadef73ddcc310ca013edbe684b0c6b23))
# [1.0.0-alpha.3](https://git.gitlab.arm.com/bazel/rules_curl/compare/v1.0.0-alpha.2...v1.0.0-alpha.3) (2024-01-29)
### Features
......
module(
name = "rules_curl",
version = "1.0.0-alpha.3",
version = "1.0.0-alpha.4",
bazel_compatibility = [
">=7.0.0",
],
......
......@@ -34,12 +34,17 @@ fi
# Parse arguments
ENDPOINT="${URL}"
DESTINATION="${DST}"
while test 0 -ne "${#}"; do
case "${1}" in
"--url")
shift
ENDPOINT="${1?Must provide an argument for --url}"
;;
"--destination")
shift
DESTINATION="${1?Must provide an argument for --destination}"
;;
*)
printf >&2 'Error: unknown argument: %s\n' "${1}"
exit 2
......@@ -47,9 +52,9 @@ while test 0 -ne "${#}"; do
esac
shift
done
readonly ENDPOINT
readonly ENDPOINT DESTINATION
printf >&2 "Uploading: %s to %s\n" "${SRC}" "${ENDPOINT}/${DST}"
printf >&2 "Uploading: %s to %s\n" "${SRC}" "${ENDPOINT}/${DESTINATION}"
# Do the upload
"${RUNFILES}/${CURL}" \
......@@ -59,4 +64,4 @@ printf >&2 "Uploading: %s to %s\n" "${SRC}" "${ENDPOINT}/${DST}"
--retry "${RETRY}" \
--retry-delay "${RETRY_DELAY}" \
--upload-file "${RUNFILES}/${SRC}" \
"${ENDPOINT}/${DST}"
"${ENDPOINT}/${DESTINATION}"