Skip to content

Commit

Permalink
fix: Do not fail if npm package has not yet been deployed (#2690)
Browse files Browse the repository at this point in the history
The check for the current version was failing if the package didn't
exist, so the first deployment a package would always fail. We're now
hitting this with the pxe.
  • Loading branch information
spalladino authored Oct 4, 2023
1 parent 98ae2d7 commit 4a52888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yarn-project/deploy_npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function deploy_package() {
TAG_ARG="--tag $TAG"
fi

PUBLISHED_VERSION=$(npm show . version ${TAG_ARG:-} 2> /dev/null)
PUBLISHED_VERSION=$(npm show . version ${TAG_ARG:-} 2> /dev/null) || true
HIGHER_VERSION=$(npx semver ${VERSION} ${PUBLISHED_VERSION} | tail -1)

# If there is already a published package equal to given version, assume this is a re-run of a deploy, and early out.
Expand Down

0 comments on commit 4a52888

Please sign in to comment.