feat: add script to manually remove archived cran pkgs
This commit is contained in:
parent
3393fa0a23
commit
f7e7df086c
1 changed files with 21 additions and 0 deletions
21
local/removed-from-cran.R
Normal file
21
local/removed-from-cran.R
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
archived <- quickcode::archivedPkg() |>
|
||||
filter(arch.status == "decom") |>
|
||||
pull(name)
|
||||
|
||||
con <- DBI::dbConnect(RPostgres::Postgres(),
|
||||
dbname = "build_metadata", host = "r-binaries.devxy.io",
|
||||
port = 15432, user = "r_binaries", password = Sys.getenv("PGPASS"),
|
||||
sslmode = "require"
|
||||
)
|
||||
|
||||
pkgs_db <- query_metadata_table() |>
|
||||
distinct(name) |>
|
||||
pull(name)
|
||||
|
||||
to_process <- pkgs_db[pkgs_db %in% archived]
|
||||
|
||||
sapply(to_process, function(.x) {
|
||||
DBI::dbExecute(con, "UPDATE single_builds SET removed = 'TRUE' where name = $1",
|
||||
params = list(.x)
|
||||
)
|
||||
})
|
||||
Loading…
Reference in a new issue