diff --git a/.Rbuildignore b/.Rbuildignore index a0b007ee..a3d5998a 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -22,3 +22,4 @@ ^cran-comments\.md$ ^CRAN-SUBMISSION$ ^codecov\.yml$ +^R/revdep\.R$ diff --git a/.sync/.gitignore b/.sync/.gitignore index 47f49fd4..eb3f2e8e 100644 --- a/.sync/.gitignore +++ b/.sync/.gitignore @@ -2,4 +2,5 @@ /dplyr-revdep/ /dplyr-cloud/ /problems*/ +/cran/ *.tar.gz diff --git a/R/revdep.R b/R/revdep.R new file mode 100644 index 00000000..b249992e --- /dev/null +++ b/R/revdep.R @@ -0,0 +1,20 @@ +pkg_review <- function(pkg, pak = TRUE) { + base_path <- ".sync/cran" + fs::dir_create(base_path) + + pkg_path <- fs::path(base_path, pkg) + + if (fs::dir_exists(pkg_path)) { + system(paste0("git -C ", pkg_path, " fetch")) + system(paste0("git -C ", pkg_path, " rebase")) + } else { + system(paste0("git -C ", base_path, " clone git@github.com:cran/", pkg)) + } + + withr::local_dir(pkg_path) + system("rh") + + if (pak) { + pak::pak(pkg, dependencies = TRUE, upgrade = TRUE, ask = FALSE) + } +} diff --git a/tools/90-patch-dplyr.R b/tools/90-patch-dplyr.R index 6f2bbc6b..055decf0 100644 --- a/tools/90-patch-dplyr.R +++ b/tools/90-patch-dplyr.R @@ -33,6 +33,7 @@ forbidden <- fs::path("R", c( "overwrite.R", "qs.R", "relational-altrep-wrap.R", + "revdep.R", "restore.R", "telemetry.R", "tpch.R",