projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
13668: Adds support for package version on API server.
[arvados.git]
/
sdk
/
python
/
gittaggers.py
diff --git
a/sdk/python/gittaggers.py
b/sdk/python/gittaggers.py
index 9223443813aee12fc0bee6781267bf6a367d7dfe..ccf25c422e62085e1edf3829459f5cdb8a8710ff 100644
(file)
--- 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
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.
"""
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',
def git_timestamp_tag(self):
gitinfo = subprocess.check_output(
['git', 'log', '--first-parent', '--max-count=1',
@@
-16,5
+25,5
@@
class EggInfoFromGit(egg_info):
def tags(self):
if self.tag_build is None:
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)
return egg_info.tags(self)