changeset 25b9d87265b5 in trytond:default
details: https://hg.tryton.org/trytond?cmd=changeset;node=25b9d87265b5
description:
Append CI build number to package version
This makes them unique and avoid collision with the shared cache.
issue8831
review254651002
diffstat:
setup.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diffs (16 lines):
diff -r 953fa4029dc3 -r 25b9d87265b5 setup.py
--- a/setup.py Mon Nov 25 14:50:33 2019 +0100
+++ b/setup.py Mon Nov 25 21:55:22 2019 +0100
@@ -53,6 +53,12 @@
version = '%s.%s.dev0' % (major_version, minor_version)
download_url = 'hg+http://hg.tryton.org/%s#egg=%s-%s' % (
name, name, version)
+local_version = []
+for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER', 'CI_JOB_ID']:
+ if os.environ.get(build):
+ local_version.append(os.environ[build])
+if local_version:
+ version += '+' + '.'.join(local_version)
if platform.python_implementation() == 'PyPy':
pg_require = ['psycopg2cffi >= 2.5.4']