Skip to content

Commit

Permalink
clean dirty
Browse files Browse the repository at this point in the history
  • Loading branch information
EeroEternal committed Dec 1, 2022
1 parent 2f5c70a commit 33f5c71
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/magicbag/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, runner=run_command):
"describe", "--tags", "--dirty", "--always", "--long",
"--match", f"{tag_prefix}[[:digit:]]*"
], cwd=root)
print(f'describe_out: {describe_out}')
print(f'rc: {rc}')

# --long was added in git-1.5.5
if describe_out is None:
raise NotThisMethod("'git describe' failed")
Expand Down Expand Up @@ -642,11 +645,14 @@ def get_versions():
"date": None}

try:
# print(f'tag prefix:{cfg.tag_prefix}')
pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)
# print(f"pieces: {pieces}")
return render(pieces, cfg.style)
except NotThisMethod:
pass

print(f'cfg parent dir:{cfg.parentdir_prefix}')
try:
if cfg.parentdir_prefix:
return versions_from_parentdir(cfg.parentdir_prefix, root, verbose)
Expand Down
8 changes: 8 additions & 0 deletions tests/test_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
"""Test versioneer."""
from magicbag._version import get_versions


def test_version():
"""Test version."""
versions = get_versions()
# print(f"versions:{versions}")

0 comments on commit 33f5c71

Please sign in to comment.