diff --git a/build_library/release_util.sh b/build_library/release_util.sh index b9790bb7fc..1015438b54 100644 --- a/build_library/release_util.sh +++ b/build_library/release_util.sh @@ -3,7 +3,7 @@ # found in the LICENSE file. GSUTIL_OPTS= -UPLOAD_ROOT="${COREOS_UPLOAD_ROOT:-gs://storage.core-os.net/coreos}" +UPLOAD_ROOT= UPLOAD_PATH= UPLOAD_DEFAULT=${FLAGS_FALSE} if [[ ${COREOS_OFFICIAL:-0} -eq 1 ]]; then @@ -17,8 +17,10 @@ DEFINE_boolean parallel ${FLAGS_TRUE} \ "Enable parallelism in gsutil." DEFINE_boolean upload ${UPLOAD_DEFAULT} \ "Upload all packages/images via gsutil." +DEFINE_string upload_root "${COREOS_UPLOAD_ROOT}" \ + "Upload prefix, board/version/etc will be appended. Must be a gs:// URL." DEFINE_string upload_path "" \ - "Upload files to an alternative location. Must be a full gs:// URL." + "Full upload path, overrides --upload_root. Must be a full gs:// URL." DEFINE_string sign_digests "" \ "Sign image DIGESTS files with the given GPG key." @@ -29,7 +31,18 @@ check_gsutil_opts() { GSUTIL_OPTS="-m" fi + if [[ -n "${FLAGS_upload_root}" ]]; then + if [[ "${FLAGS_upload_root}" != gs://* ]]; then + die_notrace "--upload_root must be a gs:// URL" + fi + # Make sure the path doesn't end with a slash + UPLOAD_ROOT="${FLAGS_upload_root%%/}" + fi + if [[ -n "${FLAGS_upload_path}" ]]; then + if [[ "${FLAGS_upload_path}" != gs://* ]]; then + die_notrace "--upload_path must be a gs:// URL" + fi # Make sure the path doesn't end with a slash UPLOAD_PATH="${FLAGS_upload_path%%/}" fi diff --git a/build_library/set_lsb_release b/build_library/set_lsb_release index 49fea724b5..b29e25e213 100755 --- a/build_library/set_lsb_release +++ b/build_library/set_lsb_release @@ -90,14 +90,12 @@ EOF # Aaaannd for the new systemd world order # os-release provides a separate build-id field, so split it from version OS_ID=$(tr '[:upper:]' '[:lower:]' <<<"$COREOS_VERSION_NAME") -OS_VERSION_ID="${COREOS_VERSION_STRING%%+*}" -OS_BUILD_ID="${COREOS_VERSION_STRING#*+}" sudo_clobber "${ROOT_FS_DIR}/etc/os-release" </dev/null <