From 8f90fad9ccc8b239e979024a5071c8317786ef46 Mon Sep 17 00:00:00 2001 From: xpl Date: Sun, 23 Jul 2017 19:42:14 +0300 Subject: [PATCH] pull requests now don't trigger deploy scripts, extracted CI pushback script to push.sh --- .travis.yml | 12 +++--------- push-wiki.sh | 4 +++- push.sh | 8 ++++++++ 3 files changed, 14 insertions(+), 10 deletions(-) create mode 100755 push.sh diff --git a/.travis.yml b/.travis.yml index 24f8df8b0a71..8f4492765338 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 "travis@travis-ci.org" -- 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: igor.kroitor@gmail.com diff --git a/push-wiki.sh b/push-wiki.sh index e09316091809..53288934f3a2 100755 --- a/push-wiki.sh +++ b/push-wiki.sh @@ -1,7 +1,9 @@ #!/bin/sh cd ccxt.wiki -git commit -a -m ${NPM_VERSION} +git config --global user.email "travis@travis-ci.org" +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 \ No newline at end of file diff --git a/push.sh b/push.sh new file mode 100755 index 000000000000..6545b4df1773 --- /dev/null +++ b/push.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +git config --global user.email "travis@travis-ci.org" +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 \ No newline at end of file