Add support for local_version on trydevpi.tryton.org

issue9928
This commit is contained in:
Cédric Krier
2020-12-10 23:05:55 +01:00
parent 7180a1ca63
commit 57af62342b
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -48,9 +48,11 @@ if minor_version % 2:
'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
name[8:], 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
@@ -12,4 +12,4 @@ setenv =
postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
sqlite: DB_NAME={env:SQLITE_NAME::memory:}
postgresql: DB_NAME={env:POSTGRESQL_NAME: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}