From 48ecee269366a3e3604d502861f3b040cd5a53cd Mon Sep 17 00:00:00 2001 From: Adam Forys Date: Tue, 3 Oct 2023 11:58:24 +0200 Subject: [PATCH] Move saving dependencies to function, do not use record --- .Rprofile | 6 +++++- .github/workflows/r-renv-lock.yml | 9 ++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.Rprofile b/.Rprofile index 6d0258b2..4c653784 100644 --- a/.Rprofile +++ b/.Rprofile @@ -4,13 +4,17 @@ c( project_dir, - dependencies + dependencies, + "devtools", + "staged.dependencies", + "styler" ) |> unique() |> renv:::renv_package_dependencies() |> names() } + options(renv.snapshot.filter = .get_dependencies) if (Sys.getenv("GITHUB_ACTIONS") != "") { diff --git a/.github/workflows/r-renv-lock.yml b/.github/workflows/r-renv-lock.yml index 6125917d..fd5015d4 100644 --- a/.github/workflows/r-renv-lock.yml +++ b/.github/workflows/r-renv-lock.yml @@ -85,7 +85,10 @@ jobs: c( project_dir, - dependencies + dependencies, + "devtools", + "staged.dependencies", + "styler" ) |> unique() |> renv:::renv_package_dependencies() |> @@ -132,10 +135,6 @@ jobs: renv::settings$snapshot.type("custom") renv::snapshot(force = TRUE, prompt = FALSE) - renv::record("roxygen2@7.2.3") - renv::record("devtools") - renv::record("styler@1.10.2") - renv::record("openpharma/staged.dependencies") if (identical(renv_profile, "4.3")) { file.copy(renv::paths$lockfile(), "renv.lock", overwrite = TRUE)