diff --git a/.travis.yml b/.travis.yml index 7cdfaec..1c0e77e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,9 @@ dist: trusty python: - '2.7' install: + - export VERSON=$(git describe --tags) - pip install -r requirements/pip.txt - pip install -e . - - python -c 'import pkg_resources; print("export VERSION={}".format(pkg_resources.get_distribution("mohand").version))' - > VERSION && source VERSION script: - echo "No Test" deploy: diff --git a/setup.py b/setup.py index c1c16f6..76296ec 100644 --- a/setup.py +++ b/setup.py @@ -1,8 +1,7 @@ # encoding=utf-8 +import os from setuptools import find_packages, setup -from source.mohand.version import get_setup_version - setup( name='mohand', url='https://github.com/littlemo/mohand', @@ -10,7 +9,7 @@ author_email='moore@moorehy.com', maintainer='littlemo', maintainer_email='moore@moorehy.com', - version=get_setup_version(), + version=os.getenv('VERSION'), description='通用自动化处理工具', long_description=open('README.md').read(), long_description_content_type='text/markdown',