From 4b46e7b749a61e739db0ac39ec8189aa8eefb8bd Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Mon, 9 Jun 2014 11:51:59 -0700 Subject: [PATCH] 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. --- core_promote | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core_promote b/core_promote index 3d035a2b30..3da095caca 100755 --- a/core_promote +++ b/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