From cb430d58e6eb10dbac686717e822a5784f80b189 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 8 Jun 2018 09:19:38 -0700 Subject: hack/release.sh: Add a guard against -dev suffixes for argv[2] Because it's easier to recover from that if we fail early instead of going through and creating a "Bump to v1.2.3-dev-dev" commit, etc. Signed-off-by: W. Trevor King Closes: #926 Approved by: rhatdan --- hack/release.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'hack/release.sh') diff --git a/hack/release.sh b/hack/release.sh index 6a91c098c..56a853347 100755 --- a/hack/release.sh +++ b/hack/release.sh @@ -12,6 +12,15 @@ VERSION="$1" NEXT_VERSION="$2" + +if test "${NEXT_VERSION}" != "${NEXT_VERSION%-dev}" +then + echo "The next-version argument '${NEXT_VERSION}' should not end in '-dev'." >&2 + echo "This script will add the -dev suffix as needed internally. Try:" >&2 + echo " $0 ${VERSION} ${NEXT_VERSION%-dev}" >&2 + exit 1 +fi + DATE=$(date '+%Y-%m-%d') LAST_TAG=$(git describe --tags --abbrev=0) -- cgit v1.2.3-54-g00ecf