inst/gha/data-connect-urls-update.R

update_connect_urls <- function(
  apps = shinycoreci:::apps_deploy,
  account = "barret",
  server = "beta.rstudioconnect.com",
  repo_dir = "."
) {

  urls <- shinycoreci::connect_urls(apps = apps, account = account, server = server)

  urls_txt <- utils::capture.output(dput(urls))

  cat(
    file = file.path(repo_dir, "R/data-connect-urls.R"),
    sep = "",
    "# Do not edit by hand!\n",
    "# This file is automatically generated by `./inst/gha/data-connect-urls-update.R`\n",
    "default_connect_urls <- ", paste0(urls_txt, collapse = "\n"), "\n"
  )
}
rstudio/shinycoreci documentation built on April 11, 2025, 3:17 p.m.