File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -35,21 +35,17 @@ jobs:
3535 git fetch --force --tags
3636 echo "Describe: $(git describe --tags --dirty --always || true)"
3737
38- RAW_VERSION=$(python -m setuptools_scm)
39- echo "Raw setuptools_scm version: $RAW_VERSION"
38+ RAW_VERSION="$(python -m setuptools_scm | tr -d '\r\n')"
39+ PKG_VERSION="$(echo "$RAW_VERSION" | sed -E 's/\+g([0-9a-f]+)/.g\1/; s/-g([0-9a-f]+)/.g\1/')"
40+
4041
41- PKG_VERSION=$(echo "$RAW_VERSION" | sed -E 's/\+g([0-9a-f]+)/.g\1/; s/-g([0-9a-f]+)/.g\1/')
42- echo "Conda-safe version: $PKG_VERSION"
4342
4443 if [ -z "$PKG_VERSION" ] || [ "$PKG_VERSION" = "0.0.0" ] || [ "$PKG_VERSION" = "None" ]; then
4544 echo "ERROR: Bad PKG_VERSION='$PKG_VERSION'"
4645 exit 1
4746 fi
4847
49- cat > conda.recipe/variant.yaml <<EOF
50- PKG_VERSION : $PKG_VERSION
51- SCM_VERSION : $RAW_VERSION
52- EOF
48+ printf "PKG_VERSION: %s\nSCM_VERSION: %s\n" "$PKG_VERSION" "$RAW_VERSION" > conda.recipe/variant.yaml
5349
5450 echo "PKG_VERSION: $PKG_VERSION" > conda.recipe/variant.yaml
5551 cat conda.recipe/variant.yaml
You can’t perform that action at this time.
0 commit comments