From 9924fb9aa13b137cae7b2573ce9b49843f7a506f Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Sun, 20 Jun 2021 23:07:06 +0100 Subject: [PATCH] Check that the version number is of the correct format --- release.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/release.sh b/release.sh index be4eaf85..f51c4e8f 100755 --- a/release.sh +++ b/release.sh @@ -12,6 +12,12 @@ if [ "$VERSION" = "" ]; then exit 1 fi +# Check the format of version +if [ ! "$(echo "$VERSION" | grep -E "[0-9]+\.[0-9]+\.[0-9]+")" ]; then + echo "Version must be of the form x.y.z" + exit 1 +fi + # Set up $DIRECTORY and $TAGNAME case "$PROJECT" in agb)