Skip to content

Commit

Permalink
pull requests now don't trigger deploy scripts, extracted CI pushback…
Browse files Browse the repository at this point in the history
… script to push.sh
  • Loading branch information
xpl committed Jul 23, 2017
1 parent dff27da commit 8f90fad
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
12 changes: 3 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,12 @@ before_install:
- brew install pandoc
# - sudo apt-get install pandoc
script:
- npm config set git-tag-version=false
- NPM_VERSION=$(npm version patch)
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then npm config set git-tag-version=false && NPM_VERSION=$(npm version patch); fi
- npm run build
- npm test
- npm run coveralls
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
- git commit -a -m "${NPM_VERSION:1}" -m "[ci skip]"
- git remote remove origin
- git remote add origin https://${GITHUB_TOKEN}@github.com/kroitor/ccxt.git
- git push origin HEAD:master
- env NPM_VERSION=${NPM_VERSION:1} GITHUB_TOKEN=${GITHUB_TOKEN} ./push-wiki.sh
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then env COMMIT_MESSAGE=${NPM_VERSION:1} GITHUB_TOKEN=${GITHUB_TOKEN} ./push.sh; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then env COMMIT_MESSAGE=${NPM_VERSION:1} GITHUB_TOKEN=${GITHUB_TOKEN} ./push-wiki.sh; fi
deploy:
- provider: npm
email: [email protected]
Expand Down
4 changes: 3 additions & 1 deletion push-wiki.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/bin/sh

cd ccxt.wiki
git commit -a -m ${NPM_VERSION}
git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
git commit -a -m ${COMMIT_MESSAGE}
git remote remove origin
git remote add origin https://${GITHUB_TOKEN}@github.com/kroitor/ccxt.wiki.git
git push origin HEAD:master
8 changes: 8 additions & 0 deletions push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

git config --global user.email "[email protected]"
git config --global user.name "Travis CI"
git commit -a -m "${COMMIT_MESSAGE}" -m "[ci skip]"
git remote remove origin
git remote add origin https://${GITHUB_TOKEN}@github.com/kroitor/ccxt.git
git push origin HEAD:master

0 comments on commit 8f90fad

Please sign in to comment.