X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/060d38d627bd1e51dd2b3c6e7de9af6aa7d7b6f3..ab92b051d6f09f1b3e670ecd39e8c96ed34570db:/sdk/cwl/gittaggers.py diff --git a/sdk/cwl/gittaggers.py b/sdk/cwl/gittaggers.py index 3fb0fdecd8..8ccb6645de 100644 --- a/sdk/cwl/gittaggers.py +++ b/sdk/cwl/gittaggers.py @@ -28,6 +28,10 @@ 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( @@ -37,5 +41,5 @@ class EggInfoFromGit(egg_info): def tags(self): if self.tag_build is None: - self.tag_build = self.git_timestamp_tag() + self.tag_build = self.git_latest_tag() + self.git_timestamp_tag() return egg_info.tags(self)