File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -151,13 +151,14 @@ trap onexit EXIT
151151
152152declare -r version_string=" ${1:- unknown} "
153153
154- if [[ ! $version_string =~ ^[0-9].[0-9].[0-9](-[a-z]+[0-9]+)? $ ]]
154+ # https://www.python.org/dev/peps/pep-0440/
155+ if [[ ! $version_string =~ ^[0-9].[0-9].[0-9]([abcr]+[0-9]+)? $ ]]
155156then
156- errexit ' first argument must be valid version string in X.Y.Z format'
157+ errexit ' first argument must be valid version string in X.Y.Z, X.Y.ZaN, X.Y.ZbN or X.Y.ZrcN format'
157158fi
158159
159160is_prerelease=' false'
160- if [[ $version_string =~ ^[0-9].[0-9].[0-9]-[a-z ]+[0-9]+$ ]]
161+ if [[ $version_string =~ ^[0-9].[0-9].[0-9][abcr ]+[0-9]+$ ]]
161162then
162163 pinfo " publishing pre-release version: $version_string "
163164 is_prerelease=' true'
You can’t perform that action at this time.
0 commit comments