Skip to content

Commit a952fe8

Browse files
committed
update versioning to use SETUPTOOLS_SCM_PRETEND_VERSION in meta.yaml and workflow
1 parent 4b15896 commit a952fe8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/python-package-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ jobs:
2626
run: |
2727
conda create -n test_vtools3 -y conda-build conda-verify numpy anaconda-client setuptools-scm
2828
source $CONDA/etc/profile.d/conda.sh
29-
GIT_DESCRIBE_TAG=$(git describe --tags --abbrev=0)
3029
conda activate test_vtools3
3130
conda config --set anaconda_upload yes
31+
export SETUPTOOLS_SCM_PRETEND_VERSION=$(python -m setuptools_scm)
3232
conda build -c cadwr-dms -c conda-forge --user cadwr-dms --token "$ANACONDA_CHANNEL_UPLOAD_TOKEN" conda.recipe
3333
conda activate
3434
conda remove -n test_vtools3 --all

conda.recipe/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
package:
77
name: vtools3
8-
version: {{ GIT_DESCRIBE_TAG }}
8+
version: {{ SETUPTOOLS_SCM_PRETEND_VERSION }}
99

1010
source:
1111
path: ..
@@ -16,7 +16,7 @@ build:
1616
# "skip: True # [py<35]" (for example) to limit to Python 3.5 and newer, or
1717
# "skip: True # [not win]" to limit to Windows.
1818
script_env:
19-
- SETUPTOOLS_SCM_PRETEND_VERSION={{ GIT_DESCRIBE_TAG }}
19+
- SETUPTOOLS_SCM_PRETEND_VERSION
2020
script: {{ PYTHON }} -m pip install --no-build-isolation --no-deps --ignore-installed -vv .
2121
noarch: python
2222
number: 0

0 commit comments

Comments
 (0)