Skip to content

Commit

Permalink
Added manifest.joson build to commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
rmbielby committed Jul 5, 2024
1 parent 68fa6d0 commit babe5dc
Show file tree
Hide file tree
Showing 4 changed files with 6,302 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .hooks/pre-commit.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,16 @@ if (error_flag) {
quit(save = "no", status = 1, runLast = FALSE)
}

cat("\n")

cat("\n2. Rebuilding manifest.json...", fill = TRUE)
if (system.file(package = "rsconnect") != "" & system.file(package = "git2r") != "") {
if (!any(grepl("manifest.json", git2r::status()))) {
rsconnect::writeManifest()
git2r::add(path = "manifest.json")
}
cat("...manifest.json rebuilt\n")
}
cat("\n")

# End of hooks
2 changes: 2 additions & 0 deletions global.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

# Library calls ---------------------------------------------------------------------------------
shhh <- suppressPackageStartupMessages # It's a library, so shhh!
shhh(library(git2r))
shhh(library(rsconnect))
shhh(library(shiny))
shhh(library(shinyjs))
shhh(library(tools))
Expand Down
Loading

0 comments on commit babe5dc

Please sign in to comment.