X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/19ae770973482257117fe8ded5619c3018c4b60f..72f08637e415ba7b08295d9f1f330894223171fb:/sdk/python/gittaggers.py diff --git a/sdk/python/gittaggers.py b/sdk/python/gittaggers.py index 9223443813..a94f14c934 100644 --- a/sdk/python/gittaggers.py +++ b/sdk/python/gittaggers.py @@ -1,3 +1,7 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 + from setuptools.command.egg_info import egg_info import subprocess import time @@ -8,6 +12,11 @@ class EggInfoFromGit(egg_info): If a build tag has already been set (e.g., "egg_info -b", building from source package), leave it alone. """ + def git_latest_tag(self): + gitinfo = subprocess.check_output( + ['git', 'describe', '--abbrev=0']).strip() + return str(gitinfo.decode('utf-8')) + def git_timestamp_tag(self): gitinfo = subprocess.check_output( ['git', 'log', '--first-parent', '--max-count=1',