sort the tags

This commit is contained in:
Semantic Versioner 2019-11-27 12:35:41 -05:00
parent ce4bfacf76
commit 29aa0a891c

View File

@ -18,7 +18,7 @@ def get_tag_version():
version = "0.0.0"
tagged_versions = subprocess.Popen(['git','tag','-l',tag_expression],
tagged_versions = subprocess.Popen(['git','tag','--sort=taggerdate', '-l',tag_expression],
stdout=subprocess.PIPE, stderr=DEVNULL, cwd=".").stdout.read().decode('utf-8').rstrip().split('\n')
if len(tagged_versions) > 0 and tagged_versions[-1] != "":
version = tagged_versions[-1]