git_repo_tags()

audeer.git_repo_tags(*, v=None)[source]

Get a list of available git tags.

The tags are inferred by executing git tag in the current folder. If the command fails, an empty list is returned.

Parameters

v (Optional[bool]) – if True tags start always with v, if False they never start with v, if None the original tag names are returned

Return type

List

Returns

list of tags

Examples

>>> git_repo_tags()
['v1.0.0', 'v1.1.0', 'v2.0.0']