forked from ccxt/ccxt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.travis.yml conditional builds [ci deploy]
- Loading branch information
Showing
2 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,20 +36,26 @@ script: | |
- ./tests-manager.sh 2>&1 | ||
- git checkout master composer.json | ||
- if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then | ||
export DEPLOY_OUTPUT=$(env DEPLOY_CACHE=.cache/deploy SECONDS_BEFORE_NEXT_DEPLOY=43200 TRAVIS_COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE}" ./build/deploy.sh); | ||
export DEPLOY_OUTPUT=$(env DEPLOY_CACHE=.cache/deploy SECONDS_BEFORE_NEXT_DEPLOY=43200 TRAVIS_COMMIT_MESSAGE=${TRAVIS_COMMIT_MESSAGE} ./build/deploy.sh); | ||
echo "----------------"; | ||
echo "${DEPLOY_OUTPUT}"; | ||
echo "----------------"; | ||
export SHOULD_DEPLOY=$(echo ${DEPLOY_OUTPUT} | awk '{print $NF}'); | ||
echo "----------------"; | ||
echo "${SHOULD_DEPLOY}"; | ||
echo "----------------"; | ||
npm config set git-tag-version=false && NPM_VERSION=$(npm version patch); | ||
npm run vss && npm run copy-python-files; | ||
npm list -g standard-version --depth=0 || npm install -g [email protected]; | ||
standard-version --skip.bump --skip.commit --skip.tag; | ||
env COMMIT_MESSAGE=${NPM_VERSION:1} GITHUB_TOKEN=${GITHUB_TOKEN} SHOULD_TAG="true" ./build/push.sh; | ||
cd python && env PYPI_TOKEN=${PYPI_TOKEN} ./deploy.sh && cd ..; | ||
if [ "$SHOULD_DEPLOY" = "true" ]; then | ||
echo "Publishing"; | ||
npm config set git-tag-version=false && NPM_VERSION=$(npm version patch); | ||
npm run vss && npm run copy-python-files; | ||
npm list -g standard-version --depth=0 || npm install -g [email protected]; | ||
standard-version --skip.bump --skip.commit --skip.tag; | ||
env COMMIT_MESSAGE=${NPM_VERSION:1} GITHUB_TOKEN=${GITHUB_TOKEN} SHOULD_TAG=${SHOULD_DEPLOY} ./build/push.sh; | ||
cd python && env PYPI_TOKEN=${PYPI_TOKEN} ./deploy.sh && cd ..; | ||
else | ||
echo "Not publishing"; | ||
env COMMIT_MESSAGE="${TRAVIS_COMMIT_MESSAGE}" GITHUB_TOKEN=${GITHUB_TOKEN} SHOULD_TAG=${SHOULD_DEPLOY} ./build/push.sh; | ||
fi; | ||
fi | ||
after_failure: | ||
- dmesg | grep -i kill | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters