diff --git a/.travis.yml b/.travis.yml index fd1c31bdb..0bbc06261 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ after_success: - coveralls before_deploy: - git checkout $TRAVIS_BRANCH +- git fetch --unshallow - python update_version_from_git.py deploy: - provider: pypi diff --git a/update_version_from_git.py b/update_version_from_git.py index 31fa08139..a48ce5945 100644 --- a/update_version_from_git.py +++ b/update_version_from_git.py @@ -61,7 +61,7 @@ def git_tag_name(): return tag_branch def get_git_version_info(): - cmd = 'git describe --tags --always' + cmd = 'git describe --tags' ver_str = subprocess.check_output(cmd, shell=True) ver, commits_since, githash = ver_str.decode().strip().split('-') return ver, commits_since, githash