Skip to content

Commit 6e23861

Browse files
committed
Support pre-release versions in release script
1 parent 5c2f6da commit 6e23861

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dev-bin/release.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fi
5454
changelog=$(cat HISTORY.rst)
5555

5656
regex='
57-
([0-9]+\.[0-9]+\.[0-9]+) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
57+
([0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
5858
\+*
5959
6060
((.|
@@ -67,8 +67,8 @@ if [[ ! $changelog =~ $regex ]]; then
6767
fi
6868

6969
version="${BASH_REMATCH[1]}"
70-
date="${BASH_REMATCH[2]}"
71-
notes="$(echo "${BASH_REMATCH[3]}" | sed -n -e '/^[0-9]\+\.[0-9]\+\.[0-9]\+/,$!p')"
70+
date="${BASH_REMATCH[3]}"
71+
notes="$(echo "${BASH_REMATCH[4]}" | sed -n -E '/^[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?/,$!p')"
7272

7373
if [[ "$date" != $(date +"%Y-%m-%d") ]]; then
7474
echo "$date is not today!"

0 commit comments

Comments
 (0)