chore: resolve latest bincraft release dynamically

Replace the hardcoded bincraft pin (@vX.Y.Z, repeated across every .crow
workflow and the build-one image) with local/install-bincraft.R, which lists
the remote tags via git ls-remote, picks the highest vX.Y.Z, and installs it
with pak (idempotent on the git ref). Now a new bincraft release is picked up
automatically on the next run -- no more editing the version in many places.

Filtering/sorting is done in R (not git --sort / refspec) for portable
behaviour, and GIT_TERMINAL_PROMPT=0 keeps non-interactive runs from hanging.
This commit is contained in:
Patrick Schratz 2026-06-30 16:18:44 +02:00
commit 207f799072
Signed by: pat-s
GPG key ID: 3C6318841EF78925

View file

@ -78,7 +78,7 @@ steps:
- git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git .
# Pin the same bincraft version the build steps use, so the precomputed
# snapshot and the per-agent library stay consistent across the pipeline.
- /opt/R/$R_VERSION/bin/R -q -e 'pak::sysreqs_db_update(); pak::pak("git::https://codefloe.com/rpkgs/bincraft.git@v4.4.2"); pak::pak(c("RPostgres", "s3fs", "data.table", "future", "jsonlite")); packageVersion("bincraft")'
- /opt/R/$R_VERSION/bin/R -q -e 'pak::sysreqs_db_update(); source("local/install-bincraft.R"); pak::pak(c("RPostgres", "s3fs", "data.table", "future", "jsonlite")); packageVersion("bincraft")'
- /opt/R/$R_VERSION/bin/R -q -e "source('local/packages-to-build.R'); saveRDS(pkgs, '/mnt/cache/packages/pkgs_to_build.rds'); saveRDS(pkgs[r_minor_sensitive == TRUE], '/mnt/cache/packages/r_minor_sensitive_pkgs.rds'); sprintf('Precomputed %s package versions (%s r-minor-sensitive)', nrow(pkgs), nrow(pkgs[r_minor_sensitive == TRUE]))"
backend_options:
docker: