Skip to content

Commit

Permalink
misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rickhelmus committed Oct 20, 2023
1 parent debb1eb commit 46fcc37
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions utils/make_bundle.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ file.copy("bundle/Renviron.site", file.path(RExtrDir, "R", "etc"), overwrite = T
# cat("\n# Customization of patRoon",
# "options(repos = c(CRAN = \"https://cran.rstudio.com/\", patRoonDeps = \"https://rickhelmus.github.io/patRoonDeps/\"))",
# sep = "\n", file = file.path(RExtrDir, "R", "etc", "Rprofile.site"), append = TRUE)
cat("\n# Customization of patRoon",
"options(repos = c(CRAN = \"https://cran.rstudio.com/\"))",
sep = "\n", file = file.path(RExtrDir, "R", "etc", "Rprofile.site"), append = TRUE)

for (dir in c(file.path(RExtrDir, "user", "library"),
file.path(RExtrDir, "user", "Rdata"),
Expand All @@ -54,7 +57,8 @@ Rlib <- normalizePath(file.path(RExtrDir, "R", "library"), winslash = "/")

execInR(sprintf(paste('install.packages("remotes")',
'thisRVersion <- paste(R.Version()$major, floor(as.numeric(R.Version()$minor)), sep = ".")',
'install.packages(Sys.glob("%s/%s/*.zip"), repos = NULL, type = "win.binary")',
'pkgdir <- file.path("%s", thisRVersion)',
'install.packages(Sys.glob(paste0(pkgdir, "/*.zip")), repos = NULL, type = "win.binary")',
'remotes::install_github("rickhelmus/patRoonData")',
'remotes::install_github("rickhelmus/patRoonExt")',
'remotes::install_github("rickhelmus/patRoonInst")',
Expand All @@ -64,6 +68,6 @@ execInR(sprintf(paste('install.packages("remotes")',
# get current GH hash so we can tag it in the bundle file name
SHA <- read.dcf(file.path(RExtrDir, "user", "library", "patRoon", "DESCRIPTION"))[, "RemoteSha"]

output <- normalizePath(sprintf("patRoon-bundle-%s.zip", strtrim(SHA, 7)))
output <- normalizePath(sprintf("patRoon-bundle-%s.zip", strtrim(SHA, 7)), mustWork = FALSE)
unlink(output)
withr::with_dir(RExtrDir, utils::zip(output, Sys.glob("*")))

0 comments on commit 46fcc37

Please sign in to comment.