diff --git a/.crow/build.yaml b/.crow/build.yaml index c980b4b..18f126f 100644 --- a/.crow/build.yaml +++ b/.crow/build.yaml @@ -168,16 +168,18 @@ steps: # with an anonymous HEAD instead of listing the bucket. The filename mirrors # what nfpm produces in builder/package.${PLATFORM} (version/release pinned # to 1): r-_1_.{apk,deb} for alpine/ubuntu, R--1-1..rpm - # for el*. + # for el*. Shell variables must use bare $name, not ${name}: crow performs + # its own ${VAR} substitution on these commands before the shell runs, so + # ${VAR} for a shell var would be blanked out (only matrix vars resolve there). case "${PLATFORM}" in - alpine-*) FILE="r-VER_1_${ARCH_ID}.apk" ;; - ubuntu-*) FILE="r-VER_1_${ARCH_ID}.deb" ;; - *) FILE="R-VER-1-1.${ARCH_ID}.rpm" ;; + alpine-*) FMT="r-%s_1_%s.apk" ;; + ubuntu-*) FMT="r-%s_1_%s.deb" ;; + *) FMT="R-%s-1-1.%s.rpm" ;; esac BASE="https://s3.eu-central-003.backblazeb2.com/devxy-r-builds/${PLATFORM_ID}" : > r-versions-existing.txt for VERSION in $(cat r-versions-to-build.txt); do - URL="${BASE}/$(echo "$FILE" | sed "s/VER/${VERSION}/")" + URL="$BASE/$(printf "$FMT" "$VERSION" "${ARCH_ID}")" if [ "$(curl -s -o /dev/null -w '%{http_code}' -I "$URL")" = "200" ]; then echo "$VERSION" >> r-versions-existing.txt fi