From 4540ef48621fed793ed63fe141cd8b4af4d5d708 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 6 Mar 2020 17:07:02 +0000 Subject: Add conditional cibuildwheel use and release script --- .travis_deploy.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .travis_deploy.sh (limited to '.travis_deploy.sh') 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 -- cgit v1.2.3