changeset 611dee1e3a71 in tryton:default
details: https://hg.tryton.org/tryton?cmd=changeset;node=611dee1e3a71
description:
Add support for local_version on trydevpi.tryton.org
issue9928
diffstat:
setup.py | 8 +++++---
tox.ini | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (27 lines):
diff -r 392c4a9f154c -r 611dee1e3a71 setup.py
--- a/setup.py Fri Dec 04 18:37:36 2020 +0100
+++ b/setup.py Thu Dec 10 23:05:58 2020 +0100
@@ -74,9 +74,11 @@
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 os.environ.get('CI_JOB_ID'):
+ local_version.append(os.environ['CI_JOB_ID'])
+else:
+ for build in ['CI_BUILD_NUMBER', 'CI_JOB_NUMBER']:
+ local_version.append(os.environ.get(build, ''))
if local_version:
version += '+' + '.'.join(local_version)
diff -r 392c4a9f154c -r 611dee1e3a71 tox.ini
--- a/tox.ini Fri Dec 04 18:37:36 2020 +0100
+++ b/tox.ini Thu Dec 10 23:05:58 2020 +0100
@@ -3,4 +3,4 @@
[testenv]
commands = {envpython} setup.py test
-install_command = pip install --pre --find-links https://trydevpi.tryton.org/
{opts} {packages}
+install_command = pip install --pre --find-links
https://trydevpi.tryton.org/?local_version={env:CI_JOB_ID:{env:CI_BUILD_NUMBER}.{env:CI_JOB_NUMBER}}
{opts} {packages}