Skip to content

Commit

Permalink
fix: add double brackets to avoid word-splitting (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
anninowak authored Apr 10, 2024
1 parent 319ddc1 commit 8d86e0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions release-script.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit 8d86e0c

Please sign in to comment.