Manage local version in tox and do not set local_version when no CI
issue9928
This commit is contained in:
1 parent
0a7250147e
commit
aa8c35bf59
2 files changed
+15
-1
No files matched your search
@@ -9,6 +9,9 @@ clone:
|
||||
pipeline:
|
||||
tox:
|
||||
image: ${IMAGE}
|
||||
environment:
|
||||
- CFLAGS=-O0
|
||||
- TOX_TESTENV_PASSENV=CFLAGS CI_BUILD_NUMBER CI_JOB_NUMBER CI_JOB_ID
|
||||
commands:
|
||||
- pip install tox
|
||||
- tox -e "${TOXENV}"
|
||||
|
||||
@@ -78,10 +78,20 @@ 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)
|
||||
|
||||
dependency_links = []
|
||||
if minor_version % 2:
|
||||
dependency_links.append(
|
||||
'https://trydevpi.tryton.org/?local_version='
|
||||
+ '.'.join(local_version))
|
||||
|
||||
dist = setup(name=name,
|
||||
version=version,
|
||||
description='Tryton desktop client',
|
||||
@@ -145,6 +155,7 @@ dist = setup(name=name,
|
||||
extras_require={
|
||||
'calendar': ['GooCalendar>=0.7'],
|
||||
},
|
||||
dependency_links=dependency_links,
|
||||
zip_safe=False,
|
||||
test_suite='tryton.tests',
|
||||
**args
|
||||
|
||||
Reference in new issue
Block a user