changeset 589b54529344 in modules/product_price_list_parent:default details: https://hg.tryton.org/modules/product_price_list_parent?cmd=changeset;node=589b54529344 description: Manage local version in tox and do not set local_version when no CI
issue9928 diffstat: .drone.yml | 2 +- setup.py | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diffs (39 lines): diff -r 5fc24ac413c5 -r 589b54529344 .drone.yml --- a/.drone.yml Thu Dec 10 23:05:56 2020 +0100 +++ b/.drone.yml Fri Dec 11 13:51:52 2020 +0100 @@ -12,7 +12,7 @@ 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 diff -r 5fc24ac413c5 -r 589b54529344 setup.py --- a/setup.py Thu Dec 10 23:05:56 2020 +0100 +++ b/setup.py Fri Dec 11 13:51:52 2020 +0100 @@ -49,7 +49,11 @@ 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) @@ -62,7 +66,9 @@ tests_require = [] 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,