Unverified Commit 8823a304 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #795 from hypothesis/wait-for-npm-release

Wait for npm release to complete before deploying to CDN
parents 8c9c51fe 5fbaa02f
......@@ -112,6 +112,7 @@ node {
// See https://github.com/yarnpkg/yarn/pull/3391.
sh "echo '//registry.npmjs.org/:_authToken=${env.NPM_TOKEN}' >> \$HOME/.npmrc"
sh "npm publish --tag ${npmTag}"
sh "scripts/wait-for-npm-release.sh"
}
}
......
#!/bin/sh
# Wait for the version of the package available on npm to match the
# version in package.json.
#
# This script is needed because a new release of a package is not always
# immediately available after "npm publish" returns.
expected_version=$(node -p "require('./package.json').version")
while [ true ]
do
released_version=$(npm show hypothesis dist-tags.latest)
if [ $released_version = $expected_version ]; then
break
fi
sleep 1
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment