Skip to content

Commit

Permalink
single threaded check
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEdmondson1234 committed Jan 27, 2022
1 parent 2a14e31 commit e351682
Showing 1 changed file with 11 additions and 25 deletions.
36 changes: 11 additions & 25 deletions cloud_build/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,28 @@ cr_deploy_pkgdown(
)

# revdep

library(revdepcheck)

pkgs <- revdep_todo()$package

a_build <- function(pkg){
make_dep_build <- function(
trg = cr_buildtrigger_repo("MarkEdmondson1234/googleAuthR",
branch = "master")){

r_cmd <- sprintf("list.files();revdepcheck::revdep_check('%s', quiet = FALSE)",
pkg)
pkg <- trg$repo$name

r_cmd <- c("revdepcheck::revdep_check(quiet = FALSE)")

bs <- cr_buildstep_r(r_cmd,
name = "gcr.io/gcer-public/packagetools")
yml <- cr_build_yaml(bs)
build <- cr_build_make(yml)

}

builds <- lapply(pkgs, a_build)
builds <- setNames(builds, pkgs)

# make build triggers for all the revdeps
a_buildtrigger <- function(
pkg,
builds,
trigger = cr_buildtrigger_repo("MarkEdmondson1234/googleAuthR",
branch = "master")){
build <- builds[[pkg]]
cli::cli_alert_info(
"Creating revdep buildtrigger for dependency {pkg}")
cr_buildtrigger(build,
name = paste0(pkg, "-revdepcheck-googleAuthR"),
name = "revdepcheck-googleAuthR",
description = Sys.time(),
trigger = trigger,
trigger = trg,
trigger_tags = "dependency_check",
overwrite = TRUE)

}

lapply(pkgs, a_buildtrigger, builds = builds)
make_dep_build()


0 comments on commit e351682

Please sign in to comment.