Skip to content

Commit

Permalink
Merge branch 'feature/autoversion' into 'develop'
Browse files Browse the repository at this point in the history
Automate package versioning

See merge request core/sevenbridges-python!51
  • Loading branch information
Dejan Knezevic committed Oct 31, 2019
2 parents 063c7d9 + 12234cf commit b181057
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 19 deletions.
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ script:
- flake8 sevenbridges
- py.test -v --cov=sevenbridges

before_deploy: echo "__version__ = '$TRAVIS_TAG'" > sevenbridges/version.py

deploy:
provider: pypi
user: sbg
Expand All @@ -24,6 +26,7 @@ deploy:
on:
tags: true
branch: develop
python: 3.7
distributions: sdist bdist_wheel
repo: sbg/sevenbridges-python
skip_existing: true
skip_cleanup: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sevenbridges-python
[![Documentation](https://readthedocs.org/projects/sevenbridges-python/badge/?version=latest)](http://sevenbridges-python.readthedocs.org/en/latest/)
[![Licence](https://img.shields.io/badge/licence-Apache-orange.svg)](https://github.com/sbg/sevenbridges-python/blob/develop/LICENCE)

[CHANGESETS](https://github.com/sbg/sevenbridges-python/blob/develop/CHANGES.md)
[CHANGELOG](https://github.com/sbg/sevenbridges-python/releases)

sevenbridges-python is a [Python](http://www.python.org/) library that
provides an interface for the [Seven Bridges Platform](https://www.sbgenomics.com/) the
Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

17 changes: 2 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,16 @@
import io
import os
import sys

from setuptools import setup, find_packages

# If version file exists, this happens during the installation phase,
# read the version from the version file.
# If the version file does not exist, this is during the build phase,
# read the version from TRAVIS_TAG and create a version file for packaging.
VERSION_FILE = 'VERSION'
if os.path.isfile(VERSION_FILE):
with io.open(VERSION_FILE, 'r', encoding='utf-8') as f:
version = f.read()
else:
version = os.environ.get('TRAVIS_TAG', '0.0.0')
with io.open(VERSION_FILE, 'w', encoding='utf-8') as f:
f.write(version)
from sevenbridges.version import __version__

install_requires = ["requests>=2.20.0", "six>=1.10.0"]
if sys.version_info < (3,):
install_requires.append("futures>=3.0.4")

setup(
name='sevenbridges-python',
version=version,
version=__version__,
description='SBG API python client bindings',
install_requires=install_requires,
long_description=io.open('README.md', 'r', encoding='utf-8').read(),
Expand Down
2 changes: 1 addition & 1 deletion sevenbridges/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import ssl
import logging

__version__ = "0.24.0"
from sevenbridges.version import __version__ # noqa

from sevenbridges.api import Api
from sevenbridges.config import Config
Expand Down
1 change: 1 addition & 0 deletions sevenbridges/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.0.1+local-build'

0 comments on commit b181057

Please sign in to comment.