Skip to content

Commit

Permalink
fix: remove quotes from if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsobarracha committed Aug 7, 2024
1 parent 724fc56 commit 0ebc66c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions wrappers/react-native/scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ export PATH="$PATH:node_modules/.bin"
# Fetch the current version from the package.json
new_version=$(node -pe "require('./package.json').version")

echo $new_version

# Fetch package name
package_name=$(node -pe "require('./package.json').name")

# Check if the new version is not the current
new_version_exists=$(yarn info $package_name --json | jq --arg version "$new_version" -r '.data.versions | any(index($version))')

# Version to this new unstable version
if [[ "$new_version_exits" == "true" ]]; then
if [[ $new_version_exists == "false" ]]; then
# Version to this new unstable version
yarn publish --no-git-tag-version --new-version $new_version
fi

# Reset changes to the package.json
git checkout -- package.json
4 changes: 2 additions & 2 deletions wrappers/wasm/scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ new_version=$(node -pe "require('./package.json').version")
# Check if the new version is not the current
new_version_exists=$(yarn info $package_name --json | jq --arg version "$new_version" -r '.data.versions | any(index($version))')

# Version to this new unstable version
if [[ "$new_version_exits" == "true" ]]; then
if [[ $new_version_exists == "false" ]]; then
# Version to this new unstable version
yarn publish --no-git-tag-version --new-version $new_version
fi

Expand Down

0 comments on commit 0ebc66c

Please sign in to comment.