1
0

environments.py aktualisiert

This commit is contained in:
Denys Konovalov 2023-10-20 19:59:00 +02:00
parent fe8cf7199b
commit 41946884d3

@ -41,8 +41,3 @@ class Environment:
replace_dict = {'<':'(', '>':')', '\n':'\n '}
result = ''.join(i if i not in replace_dict else replace_dict[i] for i in message)
return result
def get_version(self):
'''GITHUB_REF contain "refs/tags/v0.0.2" or "refs/heads/main". If second part is "tags",
return tag with version number, else - None'''
tags = self.tag.split("/")
return tags[2] if tags[1] == "tags" else None