Recognize git version from tarball name if everything else fails
This commit is contained in:
parent
3826064d1d
commit
3f66c7ceda
4
.gitignore
vendored
4
.gitignore
vendored
@ -5,5 +5,5 @@ umltest.status
|
|||||||
/.idea
|
/.idea
|
||||||
*~
|
*~
|
||||||
|
|
||||||
gitversion/*.pyc
|
src/gitversion/*.pyc
|
||||||
gitversion/__pycache__
|
src/gitversion/__pycache__
|
||||||
|
@ -108,7 +108,8 @@ def versions_from_parentdir(parentdir_prefix, root, verbose):
|
|||||||
Source tarballs conventionally unpack into a directory that includes
|
Source tarballs conventionally unpack into a directory that includes
|
||||||
both the project name and a version string.
|
both the project name and a version string.
|
||||||
"""
|
"""
|
||||||
dirname = os.path.basename(root)
|
# -- (MESSMER) CHANGED FOLLOWING LINE TO LOOK IN ../.. instead of . --
|
||||||
|
dirname = os.path.basename(os.path.abspath(os.path.join(os.path.join(root, '..'), '..')))
|
||||||
if not dirname.startswith(parentdir_prefix):
|
if not dirname.startswith(parentdir_prefix):
|
||||||
if verbose:
|
if verbose:
|
||||||
print("guessing rootdir is '%s', but '%s' doesn't start with "
|
print("guessing rootdir is '%s', but '%s' doesn't start with "
|
||||||
|
@ -590,7 +590,8 @@ def versions_from_parentdir(parentdir_prefix, root, verbose):
|
|||||||
Source tarballs conventionally unpack into a directory that includes
|
Source tarballs conventionally unpack into a directory that includes
|
||||||
both the project name and a version string.
|
both the project name and a version string.
|
||||||
"""
|
"""
|
||||||
dirname = os.path.basename(root)
|
# -- (MESSMER) CHANGED FOLLOWING LINE TO LOOK IN ../.. instead of . --
|
||||||
|
dirname = os.path.basename(os.path.abspath(os.path.join(os.path.join(root, '..'), '..')))
|
||||||
if not dirname.startswith(parentdir_prefix):
|
if not dirname.startswith(parentdir_prefix):
|
||||||
if verbose:
|
if verbose:
|
||||||
print("guessing rootdir is '%%s', but '%%s' doesn't start with "
|
print("guessing rootdir is '%%s', but '%%s' doesn't start with "
|
||||||
|
Loading…
Reference in New Issue
Block a user