Skip to content

Commit

Permalink
use all tags (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
piontec authored Oct 8, 2024
1 parent f92c94f commit 3675599
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), following [Se

### Changed

- git tag discovery uses now both annotated and unannotated tags

## [0.2.2] 2024-10-07

- fix: the previous change didn't correctly handle the case when there are no tags at all
Expand Down
2 changes: 1 addition & 1 deletion step_exec_lib/utils/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_git_version(self, strip_v_in_version: bool = True) -> str:
raise git.exc.InvalidGitRepositoryError()
sha = self._repo.head.commit.hexsha
try:
latest_tag = self._repo.git.describe()
latest_tag = self._repo.git.describe("--tags")
except git.exc.GitCommandError:
return f"0.0.0-{sha}"
if strip_v_in_version and latest_tag.startswith("v"):
Expand Down

0 comments on commit 3675599

Please sign in to comment.