We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8608d8e commit 3c0799fCopy full SHA for 3c0799f
ci/steps/publish-npm.sh
@@ -5,6 +5,14 @@ main() {
5
cd "$(dirname "$0")/../.."
6
source ./ci/lib.sh
7
8
+ # npm view won't exit with non-zero so we have to check the output.
9
+ local hasVersion
10
+ hasVersion=$(npm view "code-server@$VERSION" version)
11
+ if [[ $hasVersion == "$VERSION" ]]; then
12
+ echo "$VERSION is already published"
13
+ return
14
+ fi
15
+
16
if [[ ${CI-} ]]; then
17
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
18
fi
0 commit comments