Skip to content

Commit

Permalink
Release v1.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Dec 17, 2020
1 parent 7db9d18 commit e473d68
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Unreleased
## v1.5.2 (2020-12-17)

* For Git, avoided use of `--decorate-refs` to maintain compatibility with
older Git versions.
Expand Down
9 changes: 5 additions & 4 deletions dunamai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,12 @@ def from_git_tag_topo_order() -> Mapping[str, int]:
)
tag_lookup = {}

for tag_offset, line in enumerate(logmsg.strip().splitlines(keepends=False)):
# Simulate "--decorate-refs=refs/tags/*" for older Git versions:
if " (" in line and "tag: " not in line:
continue
# Simulate "--decorate-refs=refs/tags/*" for older Git versions:
filtered_lines = [
x for x in logmsg.strip().splitlines(keepends=False) if " (" not in x or "tag: " in x
]

for tag_offset, line in enumerate(filtered_lines):
# lines have the pattern
# <gitsha1> (tag: refs/tags/v1.2.0b1, tag: refs/tags/v1.2.0)
commit, _, tags = line.partition("(")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "dunamai"
version = "1.5.1"
version = "1.5.2"
description = "Dynamic version generation"
license = "MIT"
authors = ["Matthew T. Kennerly <mtkennerly@gmail.com>"]
Expand Down

0 comments on commit e473d68

Please sign in to comment.