diff options
| author | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-03-06 17:23:30 +0000 |
|---|---|---|
| committer | Gertjan van den Burg <gertjanvandenburg@gmail.com> | 2020-03-06 17:23:30 +0000 |
| commit | ddc434d374f6134a7f24b69c8a5e2ac616ef3cc8 (patch) | |
| tree | 5c9024f2cff170c6de0fb436067e29501ba85b32 /.travis_deploy.sh | |
| parent | Update documentation to use markdown where possible (diff) | |
| parent | Update gitignore (diff) | |
| download | pygensvm-ddc434d374f6134a7f24b69c8a5e2ac616ef3cc8.tar.gz pygensvm-ddc434d374f6134a7f24b69c8a5e2ac616ef3cc8.zip | |
Merge branch 'travis_releases'
Diffstat (limited to '.travis_deploy.sh')
| -rw-r--r-- | .travis_deploy.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/.travis_deploy.sh b/.travis_deploy.sh new file mode 100644 index 0000000..194be3d --- /dev/null +++ b/.travis_deploy.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# +# Simple travis deploy script. +# +# This was added because for some reason the inline bash command failed on +# Windows. See: +# https://travis-ci.org/alan-turing-institute/CleverCSV/jobs/618669819 +# + +set -e +set -x + +TRAVIS_TAG="$1" +PIP="$2" +PYTHON="$3" + +if [[ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]] +then + echo "Not deploying on pull request build." + exit 0; +fi + +if [[ "${TRAVIS_TAG:-}" =~ ^v[0-9]\.[0-9]\.[0-9]$ ]] +then + ls -1 wheelhouse + $PIP install twine + $PYTHON -m twine upload --verbose --skip-existing wheelhouse/* +else + echo "Not deploying, git tag doesn't match" +fi |
