Skip to content

Commit

Permalink
pass drone tag to setuptools_scm
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys committed Mar 16, 2020
1 parent 9eaf70e commit 9afd847
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ local PythonVersion(pyversion='3.5') = {
image: 'python:' + pyversion,
environment: {
PY_COLORS: 1,
SETUPTOOLS_SCM_PRETEND_VERSION: '${DRONE_TAG##v}',
},
commands: [
'pip install -qq .',
Expand Down Expand Up @@ -173,6 +174,9 @@ local PipelineBuildPackage = {
{
name: 'build',
image: 'python:3.7',
environment: {
SETUPTOOLS_SCM_PRETEND_VERSION: '${DRONE_TAG##v}',
},
commands: [
'python setup.py sdist bdist_wheel',
],
Expand Down Expand Up @@ -234,6 +238,9 @@ local PipelineBuildContainer(arch='amd64') = {
commands: [
'python setup.py bdist_wheel',
],
environment: {
SETUPTOOLS_SCM_PRETEND_VERSION: '${DRONE_TAG##v}',
},
},
{
name: 'dryrun',
Expand Down
14 changes: 13 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ steps:
- docker-tidy --version
environment:
PY_COLORS: 1
SETUPTOOLS_SCM_PRETEND_VERSION: ${DRONE_TAG##v}
depends_on:
- clone

Expand All @@ -116,6 +117,7 @@ steps:
- docker-tidy --version
environment:
PY_COLORS: 1
SETUPTOOLS_SCM_PRETEND_VERSION: ${DRONE_TAG##v}
depends_on:
- clone

Expand All @@ -127,6 +129,7 @@ steps:
- docker-tidy --version
environment:
PY_COLORS: 1
SETUPTOOLS_SCM_PRETEND_VERSION: ${DRONE_TAG##v}
depends_on:
- clone

Expand All @@ -138,6 +141,7 @@ steps:
- docker-tidy --version
environment:
PY_COLORS: 1
SETUPTOOLS_SCM_PRETEND_VERSION: ${DRONE_TAG##v}
depends_on:
- clone

Expand Down Expand Up @@ -190,6 +194,8 @@ steps:
image: python:3.7
commands:
- python setup.py sdist bdist_wheel
environment:
SETUPTOOLS_SCM_PRETEND_VERSION: ${DRONE_TAG##v}

- name: checksum
image: alpine
Expand Down Expand Up @@ -246,6 +252,8 @@ steps:
image: python:3.7
commands:
- python setup.py bdist_wheel
environment:
SETUPTOOLS_SCM_PRETEND_VERSION: ${DRONE_TAG##v}

- name: dryrun
image: plugins/docker:18-linux-amd64
Expand Down Expand Up @@ -299,6 +307,8 @@ steps:
image: python:3.7
commands:
- python setup.py bdist_wheel
environment:
SETUPTOOLS_SCM_PRETEND_VERSION: ${DRONE_TAG##v}

- name: dryrun
image: plugins/docker:18-linux-arm64
Expand Down Expand Up @@ -352,6 +362,8 @@ steps:
image: python:3.7
commands:
- python setup.py bdist_wheel
environment:
SETUPTOOLS_SCM_PRETEND_VERSION: ${DRONE_TAG##v}

- name: dryrun
image: plugins/docker:18-linux-arm
Expand Down Expand Up @@ -528,6 +540,6 @@ depends_on:

---
kind: signature
hmac: 49adcc2d9a98d979952ca688fa4ea2c013747a7bc8f2b94c507ef83410b27e45
hmac: db08f11618d3ac957b55287ac41ae743df3d3b9a87a68cda3b25c1add3f0c346

...

0 comments on commit 9afd847

Please sign in to comment.