From df1b0c687f6632bf06396da0d2b600d26709d0d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 25 Nov 2019 21:55:22 +0100 Subject: [PATCH] Append CI build number to package version This makes them unique and avoid collision with the shared cache. issue8831 review254651002 --- setup.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setup.py b/setup.py index b334de64c8..4c0bed44ce 100755 --- a/setup.py +++ b/setup.py @@ -40,6 +40,12 @@ if minor_version % 2: 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) requires = ['geomet', get_require_version('trytond'), 'psycopg2 >= 2.0.14']