Skip to content

Commit

Permalink
use CRAN layout for Artifactory by default now
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinushey committed Oct 9, 2024
1 parent b747820 commit 41716e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

# renv (development version)

* `renv` now assumes that Artifactory package repositories will use a CRAN-like
layout of packages for packages in the archive. (#1996)

* `renv` now includes compiled extensions on Linux + macOS. These
extensions are primarily used to improve the performance of
`renv::dependencies()` and other static analysis code.
Expand Down
5 changes: 3 additions & 2 deletions R/retrieve.R
Original file line number Diff line number Diff line change
Expand Up @@ -953,8 +953,9 @@ renv_retrieve_repos_archive_formatter <- function(url) {
with(record, file.path(repo, "src/contrib/Archive", Package))
},

# format used by Artifactory
# format used by older releases of Artifactory
# https://github.com/rstudio/renv/issues/602
# https://github.com/rstudio/renv/issues/1996
artifactory = function(repo, record) {
with(record, file.path(repo, "src/contrib/Archive", Package, Version))
},
Expand All @@ -981,7 +982,7 @@ renv_retrieve_repos_archive_formatter <- function(url) {

# use the headers to infer the repository type
if ("x-artifactory-id" %in% names(headers)) {
formatters[["artifactory"]]
formatters[["cran"]]
} else if (grepl("Nexus", headers[["server"]] %||% "")) {
formatters[["nexus"]]
} else {
Expand Down

0 comments on commit 41716e7

Please sign in to comment.