Do not set local_version when no CI and pass CI env to tox

issue9928
This commit is contained in:
Cédric Krier committed 2020-12-11 12:21:15 +01:00
1 parent cace385bc6
commit 9c81667378
2 files changed
+6 -2

No files matched your search

+1 -1
View File
@@ -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
+5 -1
View File
@@ -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)