From c8896f32e73000e966136a30f88fac17ee4fb27b Mon Sep 17 00:00:00 2001 From: David Keeney Date: Wed, 14 Aug 2019 10:49:42 -0700 Subject: [PATCH] Adding PYPI deployment --- .travis.yml | 17 ++++++++++++++++- ci/fetch-artifacts.sh | 12 ++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5868decf98..7a8796255b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,7 +76,22 @@ deploy: tags: true #GH requires tagged release branch: master repo: htm-community/htm.core - + + ## PYPI releases + provider: pypi + user: "__token__" # token for PYPI test account for David Keeney. Not for production + password: "pypi-AgENdGVzdC5weXBpLm9yZwIkOTk0YmZjNGYtZTgxNS00Yjk2LTg5ZTAtODE1MGI4MjZhNGZlAAIleyJwZXJtaXNzaW9ucyI6ICJ1c2VyIiwgInZlcnNpb24iOiAxfQAABiDXJOuxvodsEDoD5dOH-e0td1DdUSwrl2NCl_lP_vy6RA" + server: "https://test.pypi.org/legacy/" + on: + tags: true + branch: master + repo: htm-community/htm.core + distributions: "bdist_wheel" + file_glob: true # allows '*' in file below + file: "$TRAVIS_BUILD_DIR/build/scripts/*.whl" + skip_existing: true + skip_cleanup: true + notifications: # email: # recipients: diff --git a/ci/fetch-artifacts.sh b/ci/fetch-artifacts.sh index 8abb6b408f..8b20bd377c 100755 --- a/ci/fetch-artifacts.sh +++ b/ci/fetch-artifacts.sh @@ -18,7 +18,6 @@ for i in `seq 10`; do else echo "happy" ls *.zip - ls *.gz break fi done @@ -34,8 +33,17 @@ for i in `seq 10`; do retry=false else echo "happy" - ls *.zip ls *.gz break fi done + +# extract the wheel files for deploying to PYPI +mkdir artifacts +unzip *.zip -d artifacts +cd artifacts +tar -xf ../*.gz +cp */py/*.whl .. +cd .. +#rm -r artifacts +