Skip to content

Commit

Permalink
Changed to more elaborate version matching
Browse files Browse the repository at this point in the history
  • Loading branch information
greymistcube committed Jun 13, 2024
1 parent ebb5e84 commit 372ac50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libplanet.Tools/bin/npm-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -e
if [[ "$1" = "" ]]; then
echo error: missing version to download >&2
exit 1
elif [[ "$1" =~ ^([1-9][0-9]*|0)\.([1-9][0-9]*|0)\.([1-9][0-9]*|0)$ ]]; then
elif [[ "$1" =~ ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ ]]; then
version="$1"
else
echo error: invalid version number: "$1" >&2
Expand Down

0 comments on commit 372ac50

Please sign in to comment.