mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-27 08:31:04 +02:00
feat(core_promote): Copy alpha/beta to legacy bucket as well.
This replaces a couple of scripts I keep running to sync up the old download location.
This commit is contained in:
parent
5b476734a1
commit
4b46e7b749
16
core_promote
16
core_promote
@ -29,6 +29,8 @@ DEFINE_string build_storage "gs://builds.release.core-os.net" \
|
||||
"GS bucket with official build artifacts."
|
||||
DEFINE_string release_storage "" \
|
||||
"GS bucket for release downloads."
|
||||
DEFINE_string legacy_storage "gs://storage.core-os.net/coreos" \
|
||||
"Legacy 'storage' GS bucket."
|
||||
|
||||
# Allow toggling the assorted actions.
|
||||
DEFINE_boolean do_roller ${FLAGS_TRUE} "Update the channel in roller"
|
||||
@ -108,3 +110,17 @@ fi
|
||||
if [[ ${FLAGS_do_storage} -eq ${FLAGS_TRUE} ]]; then
|
||||
gsutil -m cp "${gs_release}/*" "${gs_current}/"
|
||||
fi
|
||||
|
||||
if [[ ${FLAGS_do_storage} -eq ${FLAGS_TRUE} ]] && \
|
||||
[[-n "${FLAGS_legacy_storage}" ]]
|
||||
then
|
||||
if [[ "${lower_channel}" == alpha ]]; then
|
||||
gsutil -m cp "${gs_release}/*" \
|
||||
"${FLAGS_legacy_storage}/${FLAGS_board}/${FLAGS_version}/"
|
||||
gsutil -m cp "${gs_current}/*" \
|
||||
"${FLAGS_legacy_storage}/${FLAGS_board}/alpha/"
|
||||
elif [[ "${lower_channel}" == beta ]]; then
|
||||
gsutil -m cp "${gs_current}/*" \
|
||||
"${FLAGS_legacy_storage}/${FLAGS_board}/beta/"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user