Skip to content

Commit 672f4fc

Browse files
author
Meir Gabay
committed
using perl to support positive lookbehind
1 parent 127bf27 commit 672f4fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/version_validation.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ msg_log(){
1717
fi
1818
}
1919

20-
if [[ $_RELEASE_VERSION =~ ^[0-9]{1,}(\.[0-9]*)*(\.[0-9]{1,}(a|b|rc)[0-9]{1,}|(\.post[0-9]{1,})|(\.dev[0-9]{1,})){0,1}(?<=[0-9]){1,}$ ]]; then
20+
_CHECK_RELEASE_VERSION=$(echo "$_RELEASE_VERSION" | perl -ne 'print $1 if /^[0-9]{1,}(\.[0-9]*)*(\.[0-9]{1,}(a|b|rc)[0-9]{1,}|(\.post[0-9]{1,})|(\.dev[0-9]{1,})){0,1}(?<=[0-9]){1,}$/s')
21+
if [[ -n $_CHECK_RELEASE_VERSION ]]; then
2122
msg_log "Passed - Release version is valid - $_RELEASE_VERSION"
2223
echo "$_RELEASE_VERSION"
2324
else

0 commit comments

Comments
 (0)