Skip to content

Commit

Permalink
Some apps need shinycoreci. Install when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
schloerke committed Sep 9, 2024
1 parent c00c063 commit 3b843c7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions inst/gha/data-apps-deps-update.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ update_apps_deps <- function(repo_dir = ".") {
subset(
revdeps,
!(
Package %in% c(base_packages(), "shinycoreci")
Package %in% c(base_packages())
)
)
apps_deps <- sort(unique(revdeps$Package))
Expand All @@ -28,13 +28,23 @@ update_apps_deps <- function(repo_dir = ".") {
apps_deps_txt <- utils::capture.output(dput(apps_deps))
apps_deps_map_txt <- utils::capture.output(dput(apps_deps_map))

# Pretty format
apps_deps_map_txt <- paste0(apps_deps_map_txt, collapse = "\n")
apps_deps_map_txt <- gsub("\n", "", apps_deps_map_txt)
apps_deps_map_txt <- gsub("\\s+", " ", apps_deps_map_txt)
apps_deps_map_txt <- gsub("(`", "(\n `", apps_deps_map_txt, fixed = TRUE)
apps_deps_map_txt <- gsub(", `", ",\n `", apps_deps_map_txt, fixed = TRUE)
apps_deps_map_txt <- gsub("))", ")\n)", apps_deps_map_txt, fixed = TRUE)
apps_deps_map_txt <- gsub(" )", ")", apps_deps_map_txt, fixed = TRUE)


cat(
file = file.path(repo_dir, "R/data-apps-deps.R"),
sep = "",
"# Do not edit by hand!\n",
"# This file is automatically generated by `./inst/gha/data-apps-deps-update.R`\n",
"apps_deps <- ", paste0(apps_deps_txt, collapse = "\n"), "\n",
"apps_deps_map <- ", paste0(apps_deps_map_txt, collapse = "\n"), "\n"
"apps_deps_map <- ", apps_deps_map_txt, "\n"
)
}

Expand Down

0 comments on commit 3b843c7

Please sign in to comment.