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 (6)
# [1.0.0-alpha.5](https://git.gitlab.arm.com/bazel/rules_curl/compare/v1.0.0-alpha.4...v1.0.0-alpha.5) (2024-02-08)
### Features
- **curl_upload_file:** add `--directory` argument ([85b75a8](https://git.gitlab.arm.com/bazel/rules_curl/commit/85b75a8b88c3a43c762fed16c6a8ffe7d9cc7f44))
- **curl_upload_file:** allow `--dst` argument alias ([3e4c487](https://git.gitlab.arm.com/bazel/rules_curl/commit/3e4c487985a459d9414ec399dbb1ae8c1369fb7e))
# [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
......
* @bazel
[Documentation] @matthew.clarkson
*.md
[Licensing] @matthew.clarkson
/.reuse/dep5
/LICENSES/*
[Configuration] @matthew.clarkson
.editorconfig
[CI] @matthew.clarkson
.gitlab-ci.yml
[Release] @matthew.clarkson
/.releaserc.yaml
[Node] @matthew.clarkson
/package.json
/.npmrc
[Branding] @matthew.clarkson
/icon.svg
[Bazel] @matthew.clarkson
/.bazelrc
/.bazelrc.ci
/.bazelignore
/.bazelversion
*.bazel
*.bzl
WORKSPACE
[curl_upload_file] @fredrik.paulsson
/curl/upload/file/
module(
name = "rules_curl",
version = "1.0.0-alpha.4",
version = "1.0.0-alpha.5",
bazel_compatibility = [
">=7.0.0",
],
......
......@@ -34,6 +34,7 @@ fi
# Parse arguments
ENDPOINT="${URL}"
DIRECTORY="/"
DESTINATION="${DST}"
while test 0 -ne "${#}"; do
case "${1}" in
......@@ -41,7 +42,11 @@ while test 0 -ne "${#}"; do
shift
ENDPOINT="${1?Must provide an argument for --url}"
;;
"--destination")
"--dir" | "--directory")
shift
DIRECTORY="${DIRECTORY}${1?Must provide an argument for --directory}/"
;;
"--dst" | "--destination")
shift
DESTINATION="${1?Must provide an argument for --destination}"
;;
......@@ -52,9 +57,12 @@ while test 0 -ne "${#}"; do
esac
shift
done
readonly ENDPOINT DESTINATION
readonly ENDPOINT DIRECTORY DESTINATION
COMPOSED="${ENDPOINT}${DIRECTORY}${DESTINATION}"
readonly COMPOSED
printf >&2 "Uploading: %s to %s\n" "${SRC}" "${ENDPOINT}/${DESTINATION}"
printf >&2 "Uploading: %s to %s\n" "${SRC}" "${COMPOSED}"
# Do the upload
"${RUNFILES}/${CURL}" \
......@@ -64,4 +72,4 @@ printf >&2 "Uploading: %s to %s\n" "${SRC}" "${ENDPOINT}/${DESTINATION}"
--retry "${RETRY}" \
--retry-delay "${RETRY_DELAY}" \
--upload-file "${RUNFILES}/${SRC}" \
"${ENDPOINT}/${DESTINATION}"
"${COMPOSED}"