From 37f2315f9b4247745391fa19e1d823737e4f36a5 Mon Sep 17 00:00:00 2001 From: pat-s Date: Fri, 18 Sep 2026 09:08:54 +0200 Subject: [PATCH] fix(ci): honour FORCE_REBUILD from both manual trigger forms The escape hatch added in #9 only read a bare $FORCE_REBUILD, which covers `crow pipeline start -p FORCE_REBUILD=1`, where the parameter is injected into the step environment. It does not cover `crow pipeline create --branch main --var FORCE_REBUILD=1`, which passes a crow substitution variable instead. Triggering a fresh run of main is a `create`, so the flag would have been silently ignored in exactly the case it is needed, and the run would skip every Alpine version it was meant to rebuild. Read the substituted ${FORCE_REBUILD} into FORCE_REBUILD_VAR and accept either source. Crow blanks an unsupplied substitution variable rather than failing, as recorded in 8eacc0a, so a plain cron run still takes the dedup path. --- .crow/build.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.crow/build.yaml b/.crow/build.yaml index acdb7a3..b10a930 100644 --- a/.crow/build.yaml +++ b/.crow/build.yaml @@ -181,10 +181,18 @@ steps: # Escape hatch for when the builder image itself changes in a way that # alters the resulting R binary (a newly enabled graphics device, a # different BLAS). The artifact filename carries only the R version, so - # dedup would otherwise keep the stale binaries forever. Set FORCE_REBUILD - # to a non-empty value as a pipeline variable on a manual run, or hardcode - # it here temporarily; uploads overwrite in place. - if [ -n "$FORCE_REBUILD" ]; then + # dedup would otherwise keep the stale binaries forever. Uploads + # overwrite in place. + # + # The two ways to trigger a manual run pass the flag differently: + # crow pipeline create --branch main --var FORCE_REBUILD=1 + # -> a crow substitution variable, read below as ${FORCE_REBUILD}, + # which crow blanks out when it was not supplied + # crow pipeline start -p FORCE_REBUILD=1 + # -> injected into the step environment, read as bare $FORCE_REBUILD + # Accept either, so the flag cannot be silently ignored. + FORCE_REBUILD_VAR="${FORCE_REBUILD}" + if [ -n "$FORCE_REBUILD_VAR" ] || [ -n "$FORCE_REBUILD" ]; then echo "FORCE_REBUILD is set, ignoring artifacts already in the bucket" else for VERSION in $(cat r-versions-to-build.txt); do -- 2.54.0