Manage local version in tox and do not set local_version when no CI
issue9928
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ pipeline:
|
||||
environment:
|
||||
- CFLAGS=-O0
|
||||
- DB_CACHE=/cache
|
||||
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
|
||||
- TOX_TESTENV_PASSENV=CFLAGS DB_CACHE CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
|
||||
- POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
|
||||
commands:
|
||||
- echo "[extensions]" >> /root/.hgrc
|
||||
|
||||
@@ -49,7 +49,11 @@ 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 os.environ.get(build):
|
||||
local_version.append(os.environ[build])
|
||||
else:
|
||||
local_version = []
|
||||
break
|
||||
if local_version:
|
||||
version += '+' + '.'.join(local_version)
|
||||
|
||||
@@ -61,7 +65,9 @@ requires.append(get_require_version('trytond'))
|
||||
|
||||
dependency_links = []
|
||||
if minor_version % 2:
|
||||
dependency_links.append('https://trydevpi.tryton.org/')
|
||||
dependency_links.append(
|
||||
'https://trydevpi.tryton.org/?local_version='
|
||||
+ '.'.join(local_version))
|
||||
|
||||
setup(name=name,
|
||||
version=version,
|
||||
|
||||
Reference in New Issue
Block a user