#' @export
upgrade <- function(repo = NULL) {
box::use(
. / util[get_module_list],
glue[glue]
)
# if no repo specified, upgrade all
if (is.null(repo)) {
package <- get_module_list()
package <- glue("{package$modules$author}/{package$modules$moduleName}")
invisible(lapply(package, upgrade_helper))
} else {
invisible(lapply(repo, upgrade_helper))
}
}
upgrade_helper <- function(x) {
box::use(
. / util[compare_SHA],
. / add[add],
. / remove[rmv = remove],
. / install[inst = install]
)
if (compare_SHA(x) == FALSE) {
invisible(rmv(x))
invisible(add(x))
invisible(inst(x))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.