From 7e93698c9bc936657d314dfc2e264b01032c5a56 Mon Sep 17 00:00:00 2001 From: Benjamin Gilbert Date: Thu, 29 Jun 2017 17:20:29 -0700 Subject: [PATCH] tag_release: Verify SDK version exists Some releases may omit the SDK for expediency. --- tag_release | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tag_release b/tag_release index ce2afba012..87c54461cf 100755 --- a/tag_release +++ b/tag_release @@ -71,6 +71,14 @@ if [[ "${FLAGS_sdk_version}" == "${BRANCH_VERSION}" ]]; then "Try --sdk_version keep to use the existing SDK." fi +# Verify that the specified SDK version exists +COREOS_SDK_VERSION="${FLAGS_sdk_version}" +. "${SCRIPT_ROOT}/sdk_lib/sdk_util.sh" +if ! curl --head --fail --silent "${COREOS_SDK_URL}" > /dev/null ; then + die_notrace "SDK version does not exist." \ + "Try --sdk_version keep to use the existing SDK." +fi + sign_args=( -s ) if [ -n "${FLAGS_signer}" ]; then sign_args=( -u "${FLAGS_signer}" )