Check that the version number is of the correct format

This commit is contained in:
Gwilym Kuiper 2021-06-20 23:07:06 +01:00
parent c1917b7d0a
commit 9924fb9aa1

View file

@ -12,6 +12,12 @@ if [ "$VERSION" = "" ]; then
exit 1 exit 1
fi 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 # Set up $DIRECTORY and $TAGNAME
case "$PROJECT" in case "$PROJECT" in
agb) agb)