From 47157819fe5d19bccc5fcc542e98f32706bff6c2 Mon Sep 17 00:00:00 2001 From: Allain Magyar Date: Thu, 12 Sep 2024 07:25:53 -0300 Subject: [PATCH] ci: fixes release script (#288) Signed-off-by: Francisco Javier Ribo Labrador Co-authored-by: Francisco Javier Ribo Labrador --- publish.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/publish.sh b/publish.sh index 6f0fa2c01..2c116f128 100755 --- a/publish.sh +++ b/publish.sh @@ -16,10 +16,11 @@ npm version "$release_version" --git-tag-version false npm run build # Gets the published versions in the registry -published_versions=$(echo "$(npm view @hyperledger/identus-edge-agent-sdk versions)" | tr -d " '") +version_list=$(npm view @hyperledger/identus-edge-agent-sdk versions) +published_versions=${version_list//[\[\]]/} # Checks if it's been already published to npmjs -if [[ $published_versions == *$release_version* ]]; then +if [[ ${published_versions[@]} =~ "'$release_version'" ]]; then # The goal of this case is to enable the generation of semantic-release # commits despite of the current version is already published. # Usually this is due some error during the pipeline execution.