diff options
author | W. Trevor King <wking@tremily.us> | 2018-06-08 09:19:38 -0700 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-06-10 10:51:11 +0000 |
commit | cb430d58e6eb10dbac686717e822a5784f80b189 (patch) | |
tree | 7f3c346bb4301f282b7776f9ca9dbe301b5113ed /hack/release.sh | |
parent | b78e7e40f1698dad5faf4d6be2ef6f3c2a410eca (diff) | |
download | podman-cb430d58e6eb10dbac686717e822a5784f80b189.tar.gz podman-cb430d58e6eb10dbac686717e822a5784f80b189.tar.bz2 podman-cb430d58e6eb10dbac686717e822a5784f80b189.zip |
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 <wking@tremily.us>
Closes: #926
Approved by: rhatdan
Diffstat (limited to 'hack/release.sh')
-rwxr-xr-x | hack/release.sh | 9 |
1 files changed, 9 insertions, 0 deletions
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) |