Skip to content

Commit

Permalink
only run deploy script on master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
nihlaeth committed Feb 26, 2017
1 parent 1b28f9d commit c6047d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ after_success:
- echo $PATH
- which bash
- which python
- test "${TRAVIS_PULL_REQUEST}" == "false" && sh ./scripts/pypi_deploy.sh
- test "${TRAVIS_PULL_REQUEST}" == "false" && test "${TRAVIS_BRANCH}" == "master" && test "${TRAVIS_PYTHON_VERSION}" == "3.6" && sh ./scripts/pypi_deploy.sh
env:
global:
- TWINE_USERNAME=nihlaeth
Expand Down
9 changes: 4 additions & 5 deletions scripts/pypi_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ repository = https://upload.pypi.org/legacy/
username = ${TWINE_USERNAME}
password = ${TWINE_PASSWORD}
_EOF_
if [ "${TRAVIS_PYTHON_VERSION}" = "3.6" ]; then
$(which twine) upload -r testpypi --skip-existing dist/*
if [ "${TRAVIS_TAG}" != "" ]; then
$(which twine) upload -r pypi --skip-existing dist/*
fi
$(which twine) upload -r testpypi --skip-existing dist/*
if [ "${TRAVIS_TAG}" != "" ]; then
$(which twine) upload -r pypi --skip-existing dist/*
fi
set +v

0 comments on commit c6047d4

Please sign in to comment.