Add python major.minor version tag (#1791)

This commit is contained in:
Ayaz Salikhov
2022-09-29 12:09:20 +04:00
committed by GitHub
parent e443036613
commit 5d535899a9
2 changed files with 9 additions and 0 deletions

View File

@@ -76,6 +76,13 @@ class PythonVersionTagger(TaggerInterface):
return "python-" + _get_program_version(container, "python").split()[1]
class PythonMajorMinorVersionTagger(TaggerInterface):
@staticmethod
def tag_value(container: Container) -> str:
full_version = PythonVersionTagger.tag_value(container)
return full_version[: full_version.rfind(".")]
class JupyterNotebookVersionTagger(TaggerInterface):
@staticmethod
def tag_value(container: Container) -> str: