Skip to content

Commit 84157a5

Browse files
committed
Fix travis script
1 parent 61b4170 commit 84157a5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.travis/script.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ deploy() {
5959
npm config set registry https://registry.npmjs.org/
6060
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
6161

62-
# dry publish run for non master
62+
# dry publish run
6363
npm pack
64-
if [ "$TRAVIS_BRANCH" == "master" ]
65-
then
64+
65+
# publish only when tagged and not a pull request
66+
if [[ "${TRAVIS_TAG}" != "" ]] && [[ "${TRAVIS_PULL_REQUEST}" = "false" ]]; then
6667
npm publish $(ls json-stream-stringify-*.tgz)
6768
fi
6869
}

0 commit comments

Comments
 (0)