Skip to content

Commit

Permalink
Feature: 尝试修改打包时的版本获取方式
Browse files Browse the repository at this point in the history
  • Loading branch information
littlemo committed Dec 9, 2019
1 parent f26e83b commit 0bd3edb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ python:
install:
- 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"
- export PKG_VERSION=$(git describe --abbrev=0 --tags)
- env | grep PKG_VERSION
# before_deploy:
# - sed -i 's/0\.0\.0/'"$VERSION"'/g' setup.py
# - cat setup.py
deploy:
provider: pypi
on:
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# 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',
author='moear developers',
author_email='[email protected]',
maintainer='littlemo',
maintainer_email='[email protected]',
version=get_setup_version(),
version=os.getenv('PKG_VERSION', '0.0.0'),
description='通用自动化处理工具',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 0bd3edb

Please sign in to comment.