Skip to content

Commit c32a7a3

Browse files
committed
Add guard as to version number;
It seem like setuptools scm can screw up and this should ensure we catch that in CI before making the wheel. We want to make sure to have a runtime check for the version number as well as a check just after building the wheel. This seem to be due to `build` latest version, so i've pinned it for now.
1 parent 34204b1 commit c32a7a3

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/releases.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,19 @@ jobs:
2121

2222
- name: Install PyBuild
2323
run: |
24-
python -m pip install build
24+
python -m pip install 'build!=0.1' setuptools-scm
2525
2626
- name: Build wheel and sdist
2727
run: |
2828
python -m build
29+
git describe
30+
pwd
31+
if [ -f dist/zarr-0.0.0.tar.gz ]; then
32+
echo "WRONG VERSION NUMBER"
33+
exit 1
34+
else
35+
echo "All seem good"
36+
fi
2937
- uses: actions/upload-artifact@v1
3038
with:
3139
name: releases

zarr/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@
1616
TempStore, ZipStore)
1717
from zarr.sync import ProcessSynchronizer, ThreadSynchronizer
1818
from zarr.version import version as __version__
19+
20+
# in case setuptools scm screw up and find version to be 0.0.0
21+
assert not __version__.startswith("0.0.0")

0 commit comments

Comments
 (0)