Skip to content

Commit

Permalink
try some more deployment stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
nihlaeth committed Feb 25, 2017
1 parent 61029a1 commit 3a0354e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ script: python -m pytest --cov=user_config --cov-report xml -v
after_script: python-codacy-coverage -r coverage.xml
deploy:
- provider: script
script: TWINE_REPOSITORY_URL=https://testpypi.python.org/pypi sh scripts/pypi_deploy.sh
script: TWINE_REPOSITORY=testpypi sh scripts/pypi_deploy.sh
on:
condition: $TRAVIS_PYTHON_VERSION = "3.6"
skip_cleanup: true
- provider: script
script: TWINE_REPOSITORY_URL=https://upload.pypi.org/legacy/ sh scripts/pypi_deploy.sh
script: TWINE_REPOSITORY=pypi sh scripts/pypi_deploy.sh
on:
tags: true
condition: $TRAVIS_PYTHON_VERSION = "3.6"
Expand Down
30 changes: 12 additions & 18 deletions scripts/pypi_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@
set -e
set +x # double-check that x is unset
python setup.py sdist bdist_wheel --universal
touch ~/.pypirc
#cat > .pypirc << EOF
#[distutils]
#index-servers=
# pypi
# testpypi
#
#[server-login]
#username = nihlaeth
#password = ${PYPI_PASSWORD}
#
#[testpypi]
#repository = https://testpypi.python.org/pypi
#
#[pypi]
#repository = https://upload.pypi.org/legacy/
#EOF
twine upload dist/*
cat > ~/.pypirc << _EOF_
[testpypi]
repository = https://testpypi.python.org/pypi
username = ${TWINE_USERNAME}
password = ${TWINE_PASSWORD}
[pypi]
repository = https://upload.pypi.org/legacy/
username = ${TWINE_USERNAME}
password = ${TWINE_PASSWORD}
_EOF_
twine upload -r ${TWINE_REPOSITORY} dist/*

0 comments on commit 3a0354e

Please sign in to comment.