Improve regex for NPM versions (#36080)
Closes #36079 Signed-off-by: Isaac Mercieca <isaac.mercieca@rs2.com>
This commit is contained in:
parent
8525be6b33
commit
ce18f963ae
1 changed files with 1 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
|||
NEW_VERSION=$1
|
||||
|
||||
# Convert NPM version to semver compatible if needed
|
||||
if [[ $NEW_VERSION =~ [0-9]+.[0-9]+.[0-9]+.[a-z] ]]; then
|
||||
if [[ $NEW_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+\.[a-z] ]]; then
|
||||
NEW_NPM_VERSION=$(echo $NEW_VERSION | awk -F '.' '{ print $1"."$2"."$3"+"$4 }')
|
||||
else
|
||||
NEW_NPM_VERSION=$NEW_VERSION
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue