Skip to content

Commit

Permalink
Update repo_management script to support R 4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Schiemann committed Feb 15, 2024
1 parent 36d9f61 commit 4e8cc03
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
7 changes: 3 additions & 4 deletions scripts/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Razel scripts
=============
# Razel scripts

These are a crude collection of functions to help generate `BUILD` files for R
packages, and `WORKSPACE` rules for external R packages. They may become part
Expand Down Expand Up @@ -133,8 +132,8 @@ you want to use this local repo as a functional mirror for macOS and windows.
# Options to also download binary archives.
options("BinariesMac" = TRUE) # Binaries for Mac
options("BinariesWin" = FALSE) # Binaries for Win
options("RVersions" = c("3.6", "4.0", "4.1")) # Binaries for these R versions.

options("RVersions" = c("3.6", "4.0", "4.1", "4.2", "4.3")) # Binaries for these R versions.
options("ForceDownload" = FALSE) # Download packages even if src package already present in repo.

#' Already downloaded source archive packages in the repo.
#'
Expand Down
11 changes: 9 additions & 2 deletions scripts/repo_management.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# Options to also download binary archives.
options("BinariesMac" = TRUE) # Binaries for Mac
options("BinariesWin" = FALSE) # Binaries for Win
options("RVersions" = c("3.6", "4.0", "4.1")) # Binaries for these R versions.
options("RVersions" = c("3.6", "4.0", "4.1", "4.2", "4.3")) # Binaries for these R versions.
options("ForceDownload" = FALSE) # Download packages even if src package already present in repo.

# Factors in unexpected places create problems.
Expand All @@ -41,6 +41,9 @@ macContribDir <- function(r_version) {
if (r_version %in% c("3.4", "3.5", "3.6")) {
contrib_prefix <- "el-capitan/"
}
if (r_version %in% c("4.3")) {
contrib_prefix <- "big-sur-x86_64/"
}
return(sprintf("/bin/macosx/%scontrib/%s", contrib_prefix, r_version))
}

Expand All @@ -61,7 +64,11 @@ isValidBinRepo <- function(repo, r_version) {
}

bioc_version <- gsub("(.*packages/|/bioc)", "", repo)
return((bioc_version == "3.14" && r_version == "4.1") ||
return((bioc_version == "3.18" && r_version == "4.3") ||
(bioc_version == "3.17" && r_version == "4.3") ||
(bioc_version == "3.16" && r_version == "4.2") ||
(bioc_version == "3.15" && r_version == "4.2") ||
(bioc_version == "3.14" && r_version == "4.1") ||
(bioc_version == "3.13" && r_version == "4.1") ||
(bioc_version == "3.12" && r_version == "4.0") ||
(bioc_version == "3.11" && r_version == "4.0") ||
Expand Down

0 comments on commit 4e8cc03

Please sign in to comment.