From 8d86e0c1034f6fa227d110b3c4feddc27927a7a2 Mon Sep 17 00:00:00 2001 From: Annika Nowak <139357202+anninowak@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:44:36 +0200 Subject: [PATCH] fix: add double brackets to avoid word-splitting (#211) --- release-script.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release-script.sh b/release-script.sh index 1f5c93b1..8ba978f9 100755 --- a/release-script.sh +++ b/release-script.sh @@ -1,7 +1,7 @@ #!/bin/bash packageJsonData=$(cat package.json) topLevelPackageVersion=$(echo "$packageJsonData" | jq -r '.version') -if [ $topLevelPackageVersion != $VERSION ] +if [[ $topLevelPackageVersion != $VERSION ]] then npx -p replace-json-property rjp ./package.json version $VERSION fi @@ -16,7 +16,7 @@ for folder in "${folder_names[@]}"; do packageJsonDataLib=$(cat libs/$folder/package.json) libPackageVersion=$(echo "$packageJsonDataLib" | jq -r '.version') packageJsonDataLib=$(echo "$packageJsonDataLib" | sed -E 's/(@onecx[^"]+?": *?")([^"]+)"/\1^'$VERSION'"/') -if [ $libPackageVersion != $VERSION ] +if [[ $libPackageVersion != $VERSION ]] then npx -p replace-json-property rjp libs/$folder/package.json version $VERSION npx nx run $folder:release