Skip to content

Commit 809403b

Browse files
committed
Handle prereleases
1 parent 1472123 commit 809403b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dev-bin/release.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ phar='minfraud.phar'
77
changelog=$(cat CHANGELOG.md)
88

99
regex='
10-
([0-9]+\.[0-9]+\.[0-9]+) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
10+
([0-9]+\.[0-9]+\.[0-9]+(-[^ ]+)?) \(([0-9]{4}-[0-9]{2}-[0-9]{2})\)
1111
-*
1212
1313
((.|
@@ -20,8 +20,8 @@ if [[ ! $changelog =~ $regex ]]; then
2020
fi
2121

2222
version="${BASH_REMATCH[1]}"
23-
date="${BASH_REMATCH[2]}"
24-
notes="$(echo "${BASH_REMATCH[3]}" | sed -n -E '/^[0-9]+\.[0-9]+\.[0-9]+/,$!p')"
23+
date="${BASH_REMATCH[3]}"
24+
notes="$(echo "${BASH_REMATCH[4]}" | sed -n -E '/^[0-9]+\.[0-9]+\.[0-9]+/,$!p')"
2525

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

0 commit comments

Comments
 (0)