From 44c17104a7c615d4e361bc683271c1312b2ec4fc Mon Sep 17 00:00:00 2001 From: Raul Date: Wed, 10 Jul 2019 19:04:48 -0400 Subject: [PATCH] [skyapi] refs #131 using script deployment --- .travis.yml | 112 +++++---------------------------------- .travis/deploy.sh | 27 ---------- .travis/skyapi_deploy.sh | 7 +++ 3 files changed, 20 insertions(+), 126 deletions(-) delete mode 100755 .travis/deploy.sh create mode 100644 .travis/skyapi_deploy.sh diff --git a/.travis.yml b/.travis.yml index 678155f2..720ababb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,10 @@ services: env: global: - CGO_ENABLED: 1 + - PYPI_USER: + secure: qPng5d9MuWToDdnABpvUvKspQJ2xj+evgBQOMxpCpXKkrp3EcJtT7VA4bi3k3RlShiKMw71+gqqpGFOO8QshRRf0qldDSzwYefUxe0/dqwuKcb77tY4yUZJtYi3MX/jmWUW0kLSedNGXv42ye4TbFxnd0yCCNVrffbIclcIapzqAECB2a61btcrLTWqaqsO5BYitEQ9VfRtv20Kx4wSjxECNGr354kYV95d74g6zF0OzxMcxha2VB4MYKQ308gX1ISF11ZuaW35ZRa81dT8/fWa9j7/xhpXVBZ6craCBtAFc3q5AcQL0FlYmhM1XFgDanhv3Uxw75mhjapyMedQFpmRT+2ej4v+Le9Etf8rxeebZRJBch0o/zw8ZRUltKSeN8comWSCwaS1NQVauhb9D0cQ7R+0ULkLkBw3E4Os+9wLWNPppw4p7v4m5SpCcD5AVeBuUFd4F9y4LNfjWGrEMfyGjcSyZqZts0xoZ3L6ta05n1vr84ah8DpQRHrMl6PeuH0dfbYRxnGEhBJcEfXZ2RmqC6EBdV1OBnWh91bUpltnwv/kG+aIhtgp/ZSQY1DukglJ2QDrXZZ0HI7TjXwYTJeScPuxsbPcluepfFrxU0K3dib8JyeJEQOfN1ioE6ln9TDGcDgTuYvBbA3ndjtqJZeWiUS7siyO9d7aE2kPZOSI= + - PYPI_PWD: + secure: Lek+1bI8jaYADO5b4oLTirI3xqdYktV/ihyGCraK+Glp/U6FwwlF3ttRpvdT9/YyVRgWEt/jePQxH+COW3WbKh54MZWCMlMKmWc4JTs6zHliAWXecAQSvPDWHjzO0F1iz839MRBfQdBUMh1g7BFi4nC886DS7ts7+p2XXGsWwtI+quOwvZ6bS0M6nMTecG8OtpYCkOAoGZI6JEoDXyIygPR5+TIWXO2QFt7KT+fsircOvDHzdA2YY/oexwUWwLLf7J0qnRm2AEx0dDjpFTCaOr6+VxdjD7F8qDoXePzVEvW7AG6k0Emx3Vuj9JiTgga8qX3ExHSXoomNhiJoOM30UbH00mdT5Fz+6HqYqFieijX/Li2fExqXXp6Za4VHMrwImrXoYQw4350F8b6QzF7E4WouBBysBZIkBEswp69783uU1lGcbU0wnyj8SN6rYIPO03MG1e5HO+Dd9avMtCMdGj3qsNlmfK0v3fAGjrYsStMQtrfOUZGTahrHPh7P3VPB4qmsJ7eNo+lFtLN0I2+ehoqMd3UH+qggdFdLQFGVMe0SWCUV9Aoyxo9vVqbnPzclsmWL44M6YRDIgOtochNiDINbdx/EA/L517GrpSDjZwvhrJkoCE7Wr9m5YcC+x8qQXCpQ4dcYAJ4C+okASAIwtjOai5dQB7TfHJfN5XzSLUI= matrix: include: @@ -12,28 +16,24 @@ matrix: env: - TOXENV=py27 - PYTHON=2.7 - - ONLY_SKYAPI=false - os: linux language: python python: 3.4 env: - TOXENV=py34 - PYTHON=3.4 - - ONLY_SKYAPI=false - os: linux language: python python: 3.5 env: - TOXENV=py35 - PYTHON=3.5 - - ONLY_SKYAPI=false - os: linux language: python python: 3.6 env: - TOXENV=py36 - PYTHON=3.6 - - ONLY_SKYAPI=false - os: linux language: python dist: xenial @@ -44,106 +44,31 @@ matrix: env: - TOXENV=py37 - PYTHON=3.7 - - ONLY_SKYAPI=false - os: osx language: go env: - PYTHON=2.7.16 - TOXENV=py27 - - ONLY_SKYAPI=false - os: osx language: go env: - PYTHON=3.4.8 - TOXENV=py34 - - ONLY_SKYAPI=false - os: osx language: go env: - PYTHON=3.5.5 - TOXENV=py35 - - ONLY_SKYAPI=false - os: osx language: go env: - PYTHON=3.6.5 - TOXENV=py36 - - ONLY_SKYAPI=false - os: osx language: go env: - PYTHON=3.7.1 - TOXENV=py37 - - ONLY_SKYAPI=false - - os: linux - language: python - python: 2.7 - env: - - TOXENV=py27 - - PYTHON=2.7 - - ONLY_SKYAPI=true - - os: linux - language: python - python: 3.4 - env: - - TOXENV=py34 - - PYTHON=3.4 - - ONLY_SKYAPI=true - - os: linux - language: python - python: 3.5 - env: - - TOXENV=py35 - - PYTHON=3.5 - - ONLY_SKYAPI=true - - os: linux - language: python - python: 3.6 - env: - - TOXENV=py36 - - PYTHON=3.6 - - ONLY_SKYAPI=true - - os: linux - language: python - dist: xenial - python: 3.7 - sudo: true - services: - - docker - env: - - TOXENV=py37 - - PYTHON=3.7 - - ONLY_SKYAPI=true - - os: osx - language: go - env: - - PYTHON=2.7.16 - - TOXENV=py27 - - ONLY_SKYAPI=true - - os: osx - language: go - env: - - PYTHON=3.4.8 - - TOXENV=py34 - - ONLY_SKYAPI=true - - os: osx - language: go - env: - - PYTHON=3.5.5 - - TOXENV=py35 - - ONLY_SKYAPI=true - - os: osx - language: go - env: - - PYTHON=3.6.5 - - TOXENV=py36 - - ONLY_SKYAPI=true - - os: osx - language: go - env: - - PYTHON=3.7.1 - - TOXENV=py37 - - ONLY_SKYAPI=true before_install: - if [[ "$TRAVIS_OS_NAME" == 'linux' ]]; then bash ./.travis/install-linux.sh ; fi @@ -166,7 +91,6 @@ install: - eval "$(gimme 1.11)" script: # Test PySkycoin -# - if [[ "$ONLY_SKYAPI" == 'false' ]]; then make test-ci ; fi - make test-ci after_failure: - cat ./.tox/${TOXENV}/log/${TOXENV}-*.log @@ -178,7 +102,6 @@ before_deploy: - make sdist - make bdist_wheel - if [ $TRAVIS_OS_NAME == "linux" ]; then make bdist_manylinux_amd64 ; fi - - if [ $ONLY_SKYAPI == "true" ]]; then cd lib/skyapi ; fi - ls dist deploy: - provider: releases @@ -191,7 +114,6 @@ deploy: all_branches: true tags: true repo: skycoin/pyskycoin - condition: $ONLY_SKYAPI = "false" - provider: pypi distributions: sdist skip_cleanup: true @@ -204,7 +126,6 @@ deploy: all_branches: true tags: true repo: skycoin/pyskycoin - condition: $ONLY_SKYAPI = "false" - provider: pypi distributions: bdist_wheel skip_cleanup: true @@ -217,34 +138,27 @@ deploy: all_branches: true tags: true repo: skycoin/pyskycoin - condition: $TRAVIS_OS_NAME = "osx" && $ONLY_SKYAPI = "false" + condition: $TRAVIS_OS_NAME = "osx" - provider: pypi distributions: sdist skip_cleanup: true skip_existing: true - user: - secure: qPng5d9MuWToDdnABpvUvKspQJ2xj+evgBQOMxpCpXKkrp3EcJtT7VA4bi3k3RlShiKMw71+gqqpGFOO8QshRRf0qldDSzwYefUxe0/dqwuKcb77tY4yUZJtYi3MX/jmWUW0kLSedNGXv42ye4TbFxnd0yCCNVrffbIclcIapzqAECB2a61btcrLTWqaqsO5BYitEQ9VfRtv20Kx4wSjxECNGr354kYV95d74g6zF0OzxMcxha2VB4MYKQ308gX1ISF11ZuaW35ZRa81dT8/fWa9j7/xhpXVBZ6craCBtAFc3q5AcQL0FlYmhM1XFgDanhv3Uxw75mhjapyMedQFpmRT+2ej4v+Le9Etf8rxeebZRJBch0o/zw8ZRUltKSeN8comWSCwaS1NQVauhb9D0cQ7R+0ULkLkBw3E4Os+9wLWNPppw4p7v4m5SpCcD5AVeBuUFd4F9y4LNfjWGrEMfyGjcSyZqZts0xoZ3L6ta05n1vr84ah8DpQRHrMl6PeuH0dfbYRxnGEhBJcEfXZ2RmqC6EBdV1OBnWh91bUpltnwv/kG+aIhtgp/ZSQY1DukglJ2QDrXZZ0HI7TjXwYTJeScPuxsbPcluepfFrxU0K3dib8JyeJEQOfN1ioE6ln9TDGcDgTuYvBbA3ndjtqJZeWiUS7siyO9d7aE2kPZOSI= - password: - secure: Lek+1bI8jaYADO5b4oLTirI3xqdYktV/ihyGCraK+Glp/U6FwwlF3ttRpvdT9/YyVRgWEt/jePQxH+COW3WbKh54MZWCMlMKmWc4JTs6zHliAWXecAQSvPDWHjzO0F1iz839MRBfQdBUMh1g7BFi4nC886DS7ts7+p2XXGsWwtI+quOwvZ6bS0M6nMTecG8OtpYCkOAoGZI6JEoDXyIygPR5+TIWXO2QFt7KT+fsircOvDHzdA2YY/oexwUWwLLf7J0qnRm2AEx0dDjpFTCaOr6+VxdjD7F8qDoXePzVEvW7AG6k0Emx3Vuj9JiTgga8qX3ExHSXoomNhiJoOM30UbH00mdT5Fz+6HqYqFieijX/Li2fExqXXp6Za4VHMrwImrXoYQw4350F8b6QzF7E4WouBBysBZIkBEswp69783uU1lGcbU0wnyj8SN6rYIPO03MG1e5HO+Dd9avMtCMdGj3qsNlmfK0v3fAGjrYsStMQtrfOUZGTahrHPh7P3VPB4qmsJ7eNo+lFtLN0I2+ehoqMd3UH+qggdFdLQFGVMe0SWCUV9Aoyxo9vVqbnPzclsmWL44M6YRDIgOtochNiDINbdx/EA/L517GrpSDjZwvhrJkoCE7Wr9m5YcC+x8qQXCpQ4dcYAJ4C+okASAIwtjOai5dQB7TfHJfN5XzSLUI= + script: bash .travis/skyapi_deploy.sh on: - all_branches: true + branches: + only: + - /^release-.*$/ tags: true repo: skycoin/pyskycoin - condition: $ONLY_SKYAPI = "true" - provider: pypi distributions: bdist_wheel skip_cleanup: true skip_existing: true - user: - secure: qPng5d9MuWToDdnABpvUvKspQJ2xj+evgBQOMxpCpXKkrp3EcJtT7VA4bi3k3RlShiKMw71+gqqpGFOO8QshRRf0qldDSzwYefUxe0/dqwuKcb77tY4yUZJtYi3MX/jmWUW0kLSedNGXv42ye4TbFxnd0yCCNVrffbIclcIapzqAECB2a61btcrLTWqaqsO5BYitEQ9VfRtv20Kx4wSjxECNGr354kYV95d74g6zF0OzxMcxha2VB4MYKQ308gX1ISF11ZuaW35ZRa81dT8/fWa9j7/xhpXVBZ6craCBtAFc3q5AcQL0FlYmhM1XFgDanhv3Uxw75mhjapyMedQFpmRT+2ej4v+Le9Etf8rxeebZRJBch0o/zw8ZRUltKSeN8comWSCwaS1NQVauhb9D0cQ7R+0ULkLkBw3E4Os+9wLWNPppw4p7v4m5SpCcD5AVeBuUFd4F9y4LNfjWGrEMfyGjcSyZqZts0xoZ3L6ta05n1vr84ah8DpQRHrMl6PeuH0dfbYRxnGEhBJcEfXZ2RmqC6EBdV1OBnWh91bUpltnwv/kG+aIhtgp/ZSQY1DukglJ2QDrXZZ0HI7TjXwYTJeScPuxsbPcluepfFrxU0K3dib8JyeJEQOfN1ioE6ln9TDGcDgTuYvBbA3ndjtqJZeWiUS7siyO9d7aE2kPZOSI= - password: - secure: Lek+1bI8jaYADO5b4oLTirI3xqdYktV/ihyGCraK+Glp/U6FwwlF3ttRpvdT9/YyVRgWEt/jePQxH+COW3WbKh54MZWCMlMKmWc4JTs6zHliAWXecAQSvPDWHjzO0F1iz839MRBfQdBUMh1g7BFi4nC886DS7ts7+p2XXGsWwtI+quOwvZ6bS0M6nMTecG8OtpYCkOAoGZI6JEoDXyIygPR5+TIWXO2QFt7KT+fsircOvDHzdA2YY/oexwUWwLLf7J0qnRm2AEx0dDjpFTCaOr6+VxdjD7F8qDoXePzVEvW7AG6k0Emx3Vuj9JiTgga8qX3ExHSXoomNhiJoOM30UbH00mdT5Fz+6HqYqFieijX/Li2fExqXXp6Za4VHMrwImrXoYQw4350F8b6QzF7E4WouBBysBZIkBEswp69783uU1lGcbU0wnyj8SN6rYIPO03MG1e5HO+Dd9avMtCMdGj3qsNlmfK0v3fAGjrYsStMQtrfOUZGTahrHPh7P3VPB4qmsJ7eNo+lFtLN0I2+ehoqMd3UH+qggdFdLQFGVMe0SWCUV9Aoyxo9vVqbnPzclsmWL44M6YRDIgOtochNiDINbdx/EA/L517GrpSDjZwvhrJkoCE7Wr9m5YcC+x8qQXCpQ4dcYAJ4C+okASAIwtjOai5dQB7TfHJfN5XzSLUI= + script: bash .travis/skyapi_deploy.sh on: - all_branches: true + branches: + only: + - /^release-.*$/ tags: true repo: skycoin/pyskycoin - condition: $TRAVIS_OS_NAME = "osx" && $ONLY_SKYAPI = "true" -# branches: -# only: -# - /^release-.*$/ # TODO: Upload manylinux wheels to PyPI diff --git a/.travis/deploy.sh b/.travis/deploy.sh deleted file mode 100755 index c14158e1..00000000 --- a/.travis/deploy.sh +++ /dev/null @@ -1,27 +0,0 @@ -# Install twine -echo "Installing twine" -python -m pip install twine - -# Make wheels -echo "Making wheels" -make sdist -make bdist_wheel -if [ $TRAVIS_OS_NAME == "linux" && $TOXENV == "py37" ]; then make bdist_manylinux_amd64 ; fi - -# Upload -echo "Upload pyskycoin to testPyPi" -twine upload -u pyskycoin -p "prerelease_0.X" --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ dist/* - -branch="release-*" -case $TRAVIS_BRANCH in - $branch) - echo "Upload skyapi to testPyPi" - twine upload -u pyskycoin -p "prerelease_0.X" --verbose --skip-existing --repository-url https://test.pypi.org/legacy/ lib/skyapi/dist/*;; - *) - echo "Not a release branch";; -esac - -# #Upload to PyPi -# echo "Upload to PyPi" -# twine upload -u $PYPITEST_USER -p $PYPITEST_PWD --repository-url https://upload.pypi.org/legacy/ dist/* -# twine upload -u $PYPITEST_USER -p $PYPITEST_PWD --repository-url https://upload.pypi.org/legacy/ lib/skyapi/dist/* \ No newline at end of file diff --git a/.travis/skyapi_deploy.sh b/.travis/skyapi_deploy.sh new file mode 100644 index 00000000..8fb05ca3 --- /dev/null +++ b/.travis/skyapi_deploy.sh @@ -0,0 +1,7 @@ +# Install twine +echo "Installing twine" +python -m pip install twine + +#Upload to PyPi +echo "Upload to PyPi" +twine upload -u $PYPI_USER -p $PYPI_PWD --repository-url https://upload.pypi.org/legacy/ lib/skyapi/dist/* \ No newline at end of file