Skip to content

Commit

Permalink
travis deploy script must be single line
Browse files Browse the repository at this point in the history
multiline strings do not get interpreted properly by travis/dpl.
ongoing issue in travis-ci/dpl#673
  • Loading branch information
andykais committed Mar 2, 2019
1 parent 32ca4e2 commit bf7cddc
Showing 1 changed file with 12 additions and 19 deletions.
31 changes: 12 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
merge_mode: replace
language: node_js

node_js:
Expand Down Expand Up @@ -31,25 +30,19 @@ jobs:
script: skip
deploy:
provider: script
script: |
(
set -Eeuo pipefail
set -x
# bump version based on github release tag
npm version --no-git-tag-version "$TRAVIS_TAG"
# publish package to npmjs.org
echo '//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}' >> ~/.npmrc
npm run build
cd lib
npm publish
cd ..
# push updated package.json to github
git checkout -b master
git add package.json package-lock.json
git commit --message "release $TRAVIS_TAG"
git remote add deploy https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
skip_cleanup: true
script: >-
npm version --no-git-tag-version "$TRAVIS_TAG" &&
echo '//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}' >> ~/.npmrc &&
npm run build &&
cd lib &&
npm publish &&
cd .. &&
git checkout -b master &&
git add package.json package-lock.json &&
git commit --message "release $TRAVIS_TAG" &&
git remote add deploy https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git &&
git push deploy master
)
on:
tags: true

Expand Down

0 comments on commit bf7cddc

Please sign in to comment.