From 01367f8eaed8b548f31f2eb7d390a7c7629f4014 Mon Sep 17 00:00:00 2001 From: vagrant-bot Date: Tue, 2 May 2023 14:33:06 -0700 Subject: [PATCH] Terraform managed file --- .ci/.ci-utility-files/common.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.ci/.ci-utility-files/common.sh b/.ci/.ci-utility-files/common.sh index 880219041..2c099a043 100644 --- a/.ci/.ci-utility-files/common.sh +++ b/.ci/.ci-utility-files/common.sh @@ -1,4 +1,7 @@ #!/usr/bin/env bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 +# # shellcheck disable=SC2119 # shellcheck disable=SC2164 @@ -596,8 +599,8 @@ function sign_file() { "o") output_file="${OPTARG}" ;; *) failure "Invalid flag provided" ;; esac - shift $((OPTIND-1)) done + shift $((OPTIND-1)) # Check that a good input file was given if [ -z "${input_file}" ]; then @@ -2064,6 +2067,10 @@ function github_create_release() { failure "Tag name is required for GitHub release" fi + if [ "${draft}" = "true" ] && [ "${prerelease}" = "true" ]; then + failure "Release cannot be both draft and prerelease" + fi + # If no name is provided, use the tag name value if [ -z "${name}" ]; then name="${tag_name}"