Commit 43ff9c03 authored by laser's avatar laser
Browse files

feat(tarball): always download release tarball

parent c6682d93
...@@ -24,21 +24,19 @@ download_release_tarball() { ...@@ -24,21 +24,19 @@ download_release_tarball() {
__tar_path="/tmp/${__release_name}_$(basename ${__release_url}).tar.gz" __tar_path="/tmp/${__release_name}_$(basename ${__release_url}).tar.gz"
if [[ ! -f "${__tar_path}" ]]; then __asset_url=$(curl \
__asset_url=$(curl \ --head \
--head \ --retry 3 \
--retry 3 \ --header "Accept:application/octet-stream" \
--header "Accept:application/octet-stream" \ --location \
--location \ --output /dev/null \
--output /dev/null \ -w %{url_effective} \
-w %{url_effective} \ "$__release_url")
"$__release_url")
curl --retry 3 --output "${__tar_path}" "$__asset_url"
curl --retry 3 --output "${__tar_path}" "$__asset_url" if [[ $? -ne "0" ]]; then
if [[ $? -ne "0" ]]; then (>&2 echo "failed to download release asset (tag URL: ${__release_tag_url}, asset URL: ${__asset_url})")
(>&2 echo "failed to download release asset (tag URL: ${__release_tag_url}, asset URL: ${__asset_url})") return 1
return 1
fi
fi fi
eval $__resultvar="'$__tar_path'" eval $__resultvar="'$__tar_path'"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment