File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,10 @@ cd "$(dirname ${BASH_SOURCE[0]})"
3939# Read the partial version number specified in the first line of src/.version.
4040version=$( head -1 ../.version)
4141
42- # Empty version number is not allowed.
43- if [ -z " $version " ]; then
44- version=" ?"
45- fi
46-
4742if [ -e ../.short_version ]; then
4843 echo " $0 : File src/.short_version exists."
4944 echo " $0 : Stopping the construction of full version number from git history."
50- elif [[ $version != + ( [0-9]). + ( [0-9]) ]]; then
45+ elif ! [[ $version =~ ^ [0-9][0-9] * . [0-9][0-9] * $ ]]; then
5146 echo " $0 : The version number \" $version \" specified in src/.version is not" \
5247 " in MAJOR.MINOR format."
5348 echo " $0 : Stopping the construction of full version number from git history."
7671 version=" $version -${head_commit_short} "
7772fi
7873
74+ # Empty version number is not allowed.
75+ if [ -z " $version " ]; then
76+ version=" ?"
77+ fi
78+
7979# Write version info to a temporary file.
8080temp=$( mktemp)
8181trap ' rm -f "$temp"' EXIT
You can’t perform that action at this time.
0 commit comments