Skip to content

Commit ae3c459

Browse files
committed
Fix automatic deployment on Travis
[skip appveyor]
1 parent 7153c89 commit ae3c459

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

.travis.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,9 @@ install:
6262
- ccache -s
6363
script:
6464
- make tests
65-
before_deploy:
66-
- |
67-
pip install -U wheel
68-
pip install twine
6965
deploy:
7066
provider: script
71-
script:
72-
- |
73-
cd $TRAVIS_BUILD_DIR
74-
if [ "$TRAVIS_OS_NAME" = "linux" ] && [ ${SDIST+x} ]; then
75-
twine upload -u $PYPI_USER -p $PYPI_PASS --skip-existing dist/*.tar.gz
76-
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
77-
PB_NATIVE_SIMD=OFF python setup.py bdist_wheel --plat-name macosx-10.9-x86_64
78-
twine upload -u $PYPI_USER -p $PYPI_PASS --skip-existing dist/*.whl
79-
fi
67+
script: $TRAVIS_BUILD_DIR/support/deploy.sh
8068
skip_cleanup: true
8169
on:
8270
tags: true

support/deploy.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
cd $TRAVIS_BUILD_DIR
4+
pip install -U wheel
5+
pip install twine
6+
7+
if [ "$TRAVIS_OS_NAME" = "linux" ] && [ -d "$TRAVIS_BUILD_DIR/dist" ]; then
8+
twine upload -u $PYPI_USER -p $PYPI_PASS --skip-existing dist/*.tar.gz
9+
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
10+
PB_NATIVE_SIMD=OFF python setup.py bdist_wheel --plat-name macosx-10.9-x86_64
11+
twine upload -u $PYPI_USER -p $PYPI_PASS --skip-existing dist/*.whl
12+
fi

support/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Support scripts for Read the Docs.
1+
Support scripts for Read the Docs and PyPI deployment.

0 commit comments

Comments
 (0)