Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3e5e0fb

Browse files
committedJan 21, 2022
fixup! publish-npm
1 parent 37c2a8a commit 3e5e0fb

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed
 

‎ci/steps/publish-npm.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -95,17 +95,14 @@ main() {
9595
popd
9696
fi
9797

98-
# If we're publishing to production we need to make sure
99-
# we haven't already published the version. This is because
100-
# npm view won't exit with non-zero so we have to check the
101-
# output.
102-
if [[ ENVIRONMENT == "production" ]]; then
103-
local hasVersion
104-
hasVersion=$(npm view "code-server@$VERSION" version)
105-
if [[ $hasVersion == "$VERSION" ]]; then
106-
echo "$VERSION is already published"
107-
return
108-
fi
98+
# We need to make sure we haven't already published the version.
99+
# This is because npm view won't exit with non-zero so we have
100+
# to check the output.
101+
local hasVersion
102+
hasVersion=$(npm view "code-server@$VERSION" version)
103+
if [[ $hasVersion == "$VERSION" ]]; then
104+
echo "$VERSION is already published"
105+
return
109106
fi
110107

111108
yarn publish --non-interactive release --tag "$NPM_TAG"

0 commit comments

Comments
 (0)
Please sign in to comment.