From 4f6f0d44a8e57648569ccf961ac0754742c7d732 Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Wed, 4 Oct 2023 17:06:39 -0300 Subject: [PATCH] fix: Remove npx from extract_tag_version --- build-system/scripts/extract_tag_version | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build-system/scripts/extract_tag_version b/build-system/scripts/extract_tag_version index 43151389717..d142458104d 100755 --- a/build-system/scripts/extract_tag_version +++ b/build-system/scripts/extract_tag_version @@ -41,14 +41,14 @@ if [[ "$COMMIT_TAG" == *"/"* ]]; then fi # Check it's a valid semver. -VERSION=$(npx semver "$COMMIT_TAG_VERSION") -if [[ -z "$VERSION" ]]; then +SEMVER_REGEX="^v?([0-9]+)\.([0-9]+)\.([0-9]+)(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?(\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?$" +if ! [[ $COMMIT_TAG_VERSION =~ $SEMVER_REGEX ]]; then echo "$COMMIT_TAG_VERSION is not a semantic version." >&2 if [[ "$ERROR_ON_FAIL" == "true" ]]; then exit 1 else - VERSION="" + COMMIT_TAG_VERSION="" fi fi -echo "$VERSION" +echo "${COMMIT_TAG_VERSION#v}"