this repo has no description

fix: fetch tags for version detection in CI

Set clone depth to 0 for releases to get full tag history.
Fetch tags explicitly before getting version.

+7 -4
+7 -4
.tangled/workflows/conda-release.yml
··· 9 9 10 10 clone: 11 11 skip: false 12 - depth: 1 12 + depth: 0 # Full history to get tags 13 13 submodules: false 14 14 15 15 dependencies: ··· 26 26 steps: 27 27 - name: "Get version from tag" 28 28 command: | 29 - TAG=$(git describe --tags --exact-match 2>/dev/null || echo "unknown") 29 + # Fetch tags if not already present 30 + git fetch --tags 31 + TAG=$(git describe --tags --exact-match HEAD 2>/dev/null || git tag --list "v*" | tail -1) 30 32 echo "Building from tag: ${TAG}" 31 33 VERSION="${TAG#v}" 32 34 echo "Package version: ${VERSION}" 33 35 34 36 - name: "Update recipe version" 35 37 command: | 36 - TAG=$(git describe --tags --exact-match 2>/dev/null || echo "unknown") 38 + git fetch --tags 39 + TAG=$(git describe --tags --exact-match HEAD 2>/dev/null || git tag --list "v*" | tail -1) 37 40 VERSION="${TAG#v}" 38 - if [ "$VERSION" = "unknown" ]; then 41 + if [ -z "$VERSION" ] || [ "$VERSION" = "unknown" ]; then 39 42 echo "ERROR: Could not determine version from tag" 40 43 exit 1 41 44 fi