mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 20:26:44 +02:00
Merge pull request #8 from flatcar-linux/dongsu/fix-vagrant-url
build_library: fix Flatcar-specific download path from GCS
This commit is contained in:
commit
0714e93621
@ -229,9 +229,14 @@ download_image_url() {
|
||||
local download_root="${FLAGS_download_root:-${UPLOAD_ROOT}}"
|
||||
|
||||
local download_path
|
||||
local download_channel
|
||||
if [[ -n "${FLAGS_download_path}" ]]; then
|
||||
download_path="${FLAGS_download_path%%/}"
|
||||
elif [[ "${download_root}" = *release.core-os.net* ]]; then
|
||||
elif [[ "${download_root}" = *flatcar-jenkins* ]]; then
|
||||
if [[ "${download_path}" == gs://* ]]; then
|
||||
download_channel="${download_root##*/}"
|
||||
download_root="gs://${download_channel}.release.flatcar-linux.net"
|
||||
fi
|
||||
# Official release download paths don't include the boards directory
|
||||
download_path="${download_root%%/}/${BOARD}/${FLATCAR_VERSION}"
|
||||
else
|
||||
@ -240,7 +245,7 @@ download_image_url() {
|
||||
|
||||
# Just in case download_root was set from UPLOAD_ROOT
|
||||
if [[ "${download_path}" == gs://* ]]; then
|
||||
download_path="http://${download_path#gs://}"
|
||||
download_path="https://${download_path#gs://}"
|
||||
fi
|
||||
|
||||
echo "${download_path}/$1"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user