this repo has no description

fix: use git to get tag version, add gnused/gnugrep

+9 -4
+9 -4
.tangled/workflows/conda-release.yml
··· 16 16 nixpkgs: 17 17 - rattler-build 18 18 - glibc 19 - - patchelf 19 + - git 20 + - gnused 21 + - gnugrep 20 22 21 23 environment: 22 24 CONDA_OVERRIDE_GLIBC: "2.17" ··· 24 26 steps: 25 27 - name: "Get version from tag" 26 28 command: | 27 - # Spindle uses REF_NAME for the tag 28 - TAG="${REF_NAME:-${GITEA_REF_NAME:-${GITHUB_REF_NAME:-unknown}}}" 29 + TAG=$(git describe --tags --exact-match 2>/dev/null || echo "unknown") 29 30 echo "Building from tag: ${TAG}" 30 31 VERSION="${TAG#v}" 31 32 echo "Package version: ${VERSION}" 32 33 33 34 - name: "Update recipe version" 34 35 command: | 35 - TAG="${REF_NAME:-${GITEA_REF_NAME:-${GITHUB_REF_NAME:-unknown}}}" 36 + TAG=$(git describe --tags --exact-match 2>/dev/null || echo "unknown") 36 37 VERSION="${TAG#v}" 38 + if [ "$VERSION" = "unknown" ]; then 39 + echo "ERROR: Could not determine version from tag" 40 + exit 1 41 + fi 37 42 echo "Setting version to: ${VERSION}" 38 43 sed -i "s/version: \"0.0.0\"/version: \"${VERSION}\"/" recipe/recipe.release.yaml 39 44 grep "version:" recipe/recipe.release.yaml