Add support for local_version on trydevpi.tryton.org

issue9928
This commit is contained in:
Cédric Krier committed 2020-12-10 23:05:58 +01:00
1 parent 8225a4d511
commit 0a7250147e
2 files changed
+6 -4

No files matched your search

+5 -3
View File
@@ -74,9 +74,11 @@ if minor_version % 2:
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)
+1 -1
View File
@@ -3,4 +3,4 @@ envlist = py36,py37,py38
[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}