Skip to content

Commit

Permalink
Improve regex for NPM versions (keycloak#36080)
Browse files Browse the repository at this point in the history
Closes keycloak#36079

Signed-off-by: Isaac Mercieca <[email protected]>
  • Loading branch information
isaac-mercieca authored Dec 23, 2024
1 parent 8525be6 commit ce18f96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion set-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce18f96

Please sign in to comment.