From fdf1b914d02756962f8a4f13a091b774d3bb7220 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Sun, 27 Oct 2024 10:58:28 +0100 Subject: [PATCH] GHA NetBSD: ignore vignettes with R code We could also do `cd $GITHUB_WORKSPACE`, otherwise the `netbsd {0}` shell does not run insode the workspace. [ci skip] --- .github/workflows/netbsd.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/netbsd.yaml b/.github/workflows/netbsd.yaml index 983a4456..e70be420 100644 --- a/.github/workflows/netbsd.yaml +++ b/.github/workflows/netbsd.yaml @@ -44,11 +44,15 @@ jobs: ln -s libfontconfig.so /usr/pkg/lib/libfontconfig.so.2 - name: Ignore vignettes - shell: netbsd {0} + shell: Rscript {0} run: | - sed -i.bak -e '/VignetteBuilder:/,+1d' DESCRIPTION - rm DESCRIPTION.bak - echo '^vignettes$' >> .Rbuildignore + dsc <- readLines("DESCRIPTION") + vb <- grep("VignetteBuilder:", dsc) + if (length(vb) > 0) { + dsc <- dsc[-(vb:(vb+1))] + writeLines(dsc, "DESCRIPTION") + } + cat("^vignettes$", file = ".Rbuildignore", append = TRUE, sep = "") - uses: r-lib/actions/setup-r-dependencies@v2 with: