Selaa lähdekoodia

Fix python pkg deployment

Signed-off-by: Vadim Markovtsev <vadim@sourced.tech>
Vadim Markovtsev 6 vuotta sitten
vanhempi
commit
6cabc30dc8
2 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 5 3
      .travis.yml
  2. 1 0
      README.md

+ 5 - 3
.travis.yml

@@ -119,14 +119,16 @@ jobs:
         - unzip -d ~/.local protoc.zip && rm protoc.zip
         - go get -v github.com/golang/dep/cmd/dep
         - export PATH=$GOPATH/bin:$PATH
-        - pip install twine pyopenssl
+        - (wget -O - https://bootstrap.pypa.io/get-pip.py || wget -O - https://raw.githubusercontent.com/pypa/get-pip/master/get-pip.py) | sudo python3 - pip==18.1
+        - sudo pip3 install twine pyopenssl
       script:
-        - test $(python3 python/setup.py --version) == $TRAVIS_TAG
+        - test v$(python3 python/setup.py --version) == $TRAVIS_TAG
       install:
         - set -e
         - travis_retry make
         - cd python
         - python3 setup.py bdist_wheel
+        - cp dist/*py3-none-any* $GOPATH/bin
         - cd ..
       after_success:
         - gzip -S .linux_amd64.gz $GOPATH/bin/hercules
@@ -139,7 +141,7 @@ jobs:
           on:
             tags: true
         - provider: script
-          script: twine upload python/dist/*py3-none-any* -u $PYPI_LOGIN -p $PYPI_PASS
+          script: twine upload $GOPATH/bin/*py3-none-any* -u $PYPI_LOGIN -p $PYPI_PASS
           skip_cleanup: true
           on:
             tags: true

+ 1 - 0
README.md

@@ -7,6 +7,7 @@
       <a href="http://godoc.org/gopkg.in/src-d/hercules.v10"><img src="https://godoc.org/gopkg.in/src-d/hercules.v10?status.svg" alt="GoDoc"></a>
       <a href="https://travis-ci.com/src-d/hercules"><img src="https://travis-ci.com/src-d/hercules.svg?branch=master" alt="Travis build Status"></a>
       <a href="https://ci.appveyor.com/project/vmarkovtsev/hercules"><img src="https://ci.appveyor.com/api/projects/status/49f0lm3v2y6xyph3?svg=true" alt="AppVeyor build status"></a>
+      <a href="https://pypi.python.org/pypi/labours"><img src="https://img.shields.io/pypi/v/labours.svg" alt="PyPi package status"></a>
       <a href="https://hub.docker.com/r/srcd/hercules"><img src="https://img.shields.io/docker/build/srcd/hercules.svg" alt="Docker build status"></a>
       <a href="https://codecov.io/gh/src-d/hercules"><img src="https://codecov.io/github/src-d/hercules/coverage.svg" alt="Code coverage"></a>
       <a href="https://goreportcard.com/report/github.com/src-d/hercules"><img src="https://goreportcard.com/badge/github.com/src-d/hercules" alt="Go Report Card"></a>