Skip to content

Commit 28b4e24

Browse files
EliEli
authored andcommitted
Eliminate fallback '0.0.0' version # that is causing false success.
1 parent 830a0f8 commit 28b4e24

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,28 @@ jobs:
2424
env:
2525
ANACONDA_CHANNEL_UPLOAD_TOKEN: ${{ secrets.ANACONDA_CHANNEL_UPLOAD_TOKEN }}
2626
run: |
27+
set -euo pipefail
28+
2729
conda create -n test_dms_datastore -y conda-build conda-verify numpy anaconda-client
2830
source $CONDA/etc/profile.d/conda.sh
2931
conda activate test_dms_datastore
3032
pip install setuptools_scm
33+
34+
git fetch --force --tags
35+
echo "HEAD: $(git rev-parse HEAD)"
36+
echo "Describe: $(git describe --tags --dirty --always || true)"
37+
3138
PKG_VERSION=$(python -m setuptools_scm | sed 's/+/-/g')
3239
echo "Building version: $PKG_VERSION"
40+
41+
if [ -z "$PKG_VERSION" ] || [ "$PKG_VERSION" = "0.0.0" ]; then
42+
echo "ERROR: Bad PKG_VERSION='$PKG_VERSION' (missing tags or setuptools_scm failure)"
43+
exit 1
44+
fi
45+
3346
conda config --set anaconda_upload yes
3447
PKG_VERSION=$PKG_VERSION conda build -c cadwr-dms -c conda-forge --user cadwr-dms --token "$ANACONDA_CHANNEL_UPLOAD_TOKEN" conda.recipe
35-
conda activate
48+
49+
conda deactivate
3650
conda remove -n test_dms_datastore --all
51+

conda.recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package:
66
name: dms-datastore
77
# Use the environment variable passed from the shell
88
# Set via: export PKG_VERSION=$(python -m setuptools_scm)
9-
version: {{ environ.get('PKG_VERSION', '0.0.0') }}
9+
version: {{ environ.get('PKG_VERSION') }}
1010

1111
source:
1212
path: ..

0 commit comments

Comments
 (0)