diff --git a/.Rbuildignore b/.Rbuildignore index a3586e0f06..117b9b3fb8 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -43,3 +43,4 @@ src/vendor/cigraph ^AUTHORS-list\.md$ ^CITATION\.cff$ ^cran$ +^R/cran\.R$ diff --git a/R/cran.R b/R/cran.R new file mode 100644 index 0000000000..99a8bfee4a --- /dev/null +++ b/R/cran.R @@ -0,0 +1,5 @@ +cran_install <- function() { + unlink("cran", recursive = TRUE) + dir.create("cran") + pak::pak("igraph", lib = "cran", dependencies = FALSE) +} diff --git a/tests/testthat/helper.R b/tests/testthat/helper.R index 139d36b8a3..4426fed441 100644 --- a/tests/testthat/helper.R +++ b/tests/testthat/helper.R @@ -25,9 +25,3 @@ expect_that <- function(object, condition, info = NULL, label = NULL) { condition(object) ) } - -cran_install <- function() { - unlink("cran", recursive = TRUE) - dir.create("cran") - pak::pak("igraph", lib = "cran", dependencies = FALSE) -}