diff --git a/.travis/deploy.sh b/.travis/deploy.sh index dd16410b2..4af31158b 100755 --- a/.travis/deploy.sh +++ b/.travis/deploy.sh @@ -61,21 +61,6 @@ else _exit "Unknown build focus" 1 fi -# Hold onto the version number -export VERSION=$(node -e "console.log(require('${DIR}/package.json').version)") - -# Publish with tag -echo "Pushing with tag ${TAG}" -lerna exec -- npm publish --tag="${TAG}" 2>&1 - -# Check that all required modules have been published to npm and are retrievable -for j in ${NPM_MODULES}; do - # check the next in the list - while ! npm view ${j}@${VERSION} | grep dist-tags > /dev/null 2>&1; do - sleep 10 - done -done - ## Stable releases only; both latest and next then clean up git, and bump version number if [[ "${BUILD_RELEASE}" = "stable" ]]; then @@ -97,4 +82,21 @@ if [[ "${BUILD_RELEASE}" = "stable" ]]; then fi +# Hold onto the version number +export VERSION=$(node -e "console.log(require('${DIR}/package.json').version)") + +# Publish with tag +echo "Pushing with tag ${TAG}" +lerna exec -- npm publish --tag="${TAG}" 2>&1 + +# Check that all required modules have been published to npm and are retrievable +for j in ${NPM_MODULES}; do + # check the next in the list + while ! npm view ${j}@${VERSION} | grep dist-tags > /dev/null 2>&1; do + sleep 10 + done +done + + + _exit "All complete" 0 \ No newline at end of file