jnrbase
jnrbase.git.
find_tag
Find closest tag for a git repository.
Note
This defaults to Semantic Version tag matching.
__matcher (str) – Glob-style tag pattern to match
str
strict (bool) – Allow commit-ish, if no tag found
bool
git_dir (Optional[Path]) – Repository to search
Optional
Path
Matching tag name
>>> with tarball_data('semver') as tree: ... find_tag(git_dir=tree) 'v2.3.4'