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
151
151
152
152
declare -r version_string=" ${1:- unknown} "
153
153
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]+)? $ ]]
155
156
then
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'
157
158
fi
158
159
159
160
is_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]+$ ]]
161
162
then
162
163
pinfo " publishing pre-release version: $version_string "
163
164
is_prerelease=' true'
You can’t perform that action at this time.
0 commit comments