mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 06:01:41 +02:00
fix(release_util): Add options to configure download path.
Since the new bucket scheme uploads images to a private staging area first we need to configure the final location to generate vagrant json metadata correctly.
This commit is contained in:
parent
2e9911b978
commit
ff2d216142
@ -24,6 +24,10 @@ DEFINE_string upload_root "${COREOS_UPLOAD_ROOT}" \
|
||||
"Upload prefix, board/version/etc will be appended. Must be a gs:// URL."
|
||||
DEFINE_string upload_path "" \
|
||||
"Full upload path, overrides --upload_root. Must be a full gs:// URL."
|
||||
DEFINE_string download_root "" \
|
||||
"HTTP download prefix, board/version/etc will be appended."
|
||||
DEFINE_string download_path "" \
|
||||
"HTTP download path, overrides --download_root."
|
||||
DEFINE_string sign "" \
|
||||
"Sign all files to be uploaded with the given GPG key."
|
||||
DEFINE_string sign_digests "" \
|
||||
@ -185,9 +189,12 @@ download_image_url() {
|
||||
echo "$1"
|
||||
return 0
|
||||
fi
|
||||
local upload_path="${UPLOAD_ROOT}/${BOARD}/${COREOS_VERSION_STRING}"
|
||||
if [[ -n "${UPLOAD_PATH}" ]]; then
|
||||
upload_path="${UPLOAD_PATH}"
|
||||
|
||||
local download_root="${FLAGS_download_root:-${UPLOAD_ROOT}}"
|
||||
local download_path="${download_root%%/}/${BOARD}/${COREOS_VERSION_STRING}"
|
||||
if [[ -n "${FLAGS_download_path}" ]]; then
|
||||
download_path="${FLAGS_download_path%%/}"
|
||||
fi
|
||||
echo "http://${upload_path#gs://}/$1"
|
||||
|
||||
echo "http://${download_path#gs://}/$1"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user