diff options
-rw-r--r-- | .travis.yml | 20 | ||||
-rw-r--r-- | setup.py | 12 |
2 files changed, 27 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml index 190ffef..52f5005 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,20 @@ language: python python: - - "3.6" + - '3.6' install: - - pip install -r requirements.txt - - pip install flake8~=3.5.0 + - pip install flake8~=3.5.0 script: - - flake8 + - flake8 + - python setup.py bdist_wheel +before_deploy: + - git config --local user.name "Travis CI" + - git config --local user.email "matt+travisci@xcolour.net" + - git tag "build-$TRAVIS_BUILD_NUMBER" +deploy: + provider: releases + api_key: + secure: NAvMJri+3inKF+v2fiXqX4uvqeCY5r9SE1rfOH+SC2DNYQy31FlJUnxY3xWSbiB+dNrWxwOgED18DLTWIcCNYJDuY+4LBkw7hzhomL6+AeeIQ7WLXb8NMMY+HMXmG6qeCNlAQwDSiHGEqyMBcQRWok5iHT/OFZhgEZ4gz5aovFeCpnSUyRwcMtpIFMywi6nlC9TZPX+Z+S7NsqlOQ1o9n1957OLYcCcVwJFvi5RJs842KxxHFeGdsCVHRQC5l249ZuC8tRVgYKxzCxTeSJOphyh4PawI7VYmmTb56Y40A/Rj8M/MK6l/BRnmtunUPsokPduqG1/Eh1uqtjcEyVzS3NYprWN8UzgKL0Jt+asHJDQ+MWm2d1hl+mrqF6hB/Irs93LQ0uKdsZjnz0njDcFaz8a/U9YeGNUqw03bpdHk4/ZTEivFlaYANVmMUkVFpUi68f9FGvzQ+GUfwbCTdP+6jyt5bQ7BjQ3arHK5lJS9/ZNP+gZ4QGP3oOnwlaVpfqzsubDIJOoAototSM5vaY892ffOtFSDEJEaYiqCdWHcmOovne08Yru6KC5maJmZQwHxGKDHarZzZNGJUBjuVfDXMGSjm5OxUthJ3/13jnXckZNSRqkn8xFOV89muzNSMq27iSIYhy/BZoD8EGx+0zX3+nNLyAn+yzq+6RtsZ6HswjU= + file: 'dist/*.whl' + skip_cleanup: true + on: + repo: xcolour/unbiased @@ -1,8 +1,18 @@ +import os from setuptools import setup +buildnum = os.environ.get('TRAVIS_BUILD_NUMBER') +if buildnum is None: + version = '0.dev0' +else: + version = buildnum +gitrev = os.environ.get('TRAVIS_COMMIT') +if gitrev is not None: + version = '{}+{}'.format(version, gitrev) + setup( name="unbiased", - version="5", + version=version, packages=['unbiased', 'unbiased.sources'], package_data={ 'unbiased': [ |