Wrapper functions to quickly re-install the current package and/or upload it via a git commit command (after appropriate checks).

reinstall_my_package(dir = ".")

update_my_package(
  git_message = NULL,
  update_type = "dev",
  ignore_notes = F,
  dir = ".",
  verbose = F
)

Arguments

dir

directory of the package (or a sub-directory of one). If NULL, the current working directory will be used.

git_message

git commit message to be passed to the git() function. If no git_message is provided, then the update will not be commited. If git_message is supplied, then it will be used as the git commit message if used.

update_type

what level of update version to use. Accepts "major", "minor","patch", or "dev". Uses "dev" as default.

ignore_notes

should the Notes returned by running devtools::check() be ignored? (Errors and Warnings are never ignored and should be fixed before upload)

verbose

logical. Should update_my_package() be chatty?

Functions

  • reinstall_my_package: performs a few functions to quickly and automatically update a package. In simple terms, it performs the following:

  • update_my_package: is much more thorough than reinstall_my_package(). It also ensures the package files are styled according to the tidyverse style guide (essential as per usethis::use_tidy_style(strict=T). It then performs an R CMD CHECK on the package to ensure it works robustly. If the check passes (i.e. it doesn't throw an Error, Warning or Note), then it will update the package version (in the DESCRIPTION file), and then commit and push the package to git.