diff --git a/DESCRIPTION b/DESCRIPTION index c39e0b9..afc4277 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: checked Title: Systematically Run R CMD Checks -Version: 0.6.2 +Version: 0.6.3 Authors@R: c( person( diff --git a/NEWS.md b/NEWS.md index c7e26dd..05338a7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,9 @@ -# checked 0.6.1 +# checked 0.6.3 + +* When fetching remotes dependencies, untar output if git endpoint + returns `.tar.gz` file. + +# checked 0.6.2 * Ignore package-dep pairs duplicate in the `pkg_dependencies` helper when constructing dependencies data.frame. This makes sure `checked` diff --git a/R/remotes.R b/R/remotes.R index 23e5c6f..336474b 100644 --- a/R/remotes.R +++ b/R/remotes.R @@ -125,9 +125,18 @@ get_remote_tasks.pkg_origin_remote <- function(x) { get_remote_package_source <- function(remote) { path <- file.path(path_remotes(), hash(remote)) - if (dir.exists(path)) return(path) + if (file.exists(file.path(path, "DESCRIPTION"))) return(path) dir_create(path) tmp <- remotes::remote_download(remote, quiet = TRUE) + if (endsWith(tmp, ".tar.gz")) { + tmp2 <- tempfile() + untar(tmp, exdir = tmp2) + tmp <- if (file.exists(file.path(tmp, "DESCRIPTION"))) { + tmp2 + } else { + list.dirs(tmp2, full.names = TRUE, recursive = FALSE) + } + } file.copy( from = list.files(tmp, full.names = TRUE, recursive = FALSE), to = path,