Learn R Programming

tic (version 0.4.0)

do_drat: Build and deploy drat repository

Description

do_drat() builds and deploys R packages to a drat repository and adds default steps to the "install", "before_deploy" and "deploy" stages:

  1. step_setup_ssh() in the "before_deploy" to setup the upcoming deployment

  2. step_setup_push_deploy() in the "before_deploy" stage (if deploy is set),

  3. step_add_to_drat() in the "deploy"

  4. step_do_push_deploy() in the "deploy" stage.

Usage

do_drat(
  repo_slug = NULL,
  orphan = FALSE,
  checkout = TRUE,
  path = "~/git/drat",
  branch = "master",
  remote_url = NULL,
  commit_message = NULL,
  commit_paths = ".",
  ssh_key_name = "id_rsa",
  deploy_dev = FALSE
)

Arguments

repo_slug

[string] The name of the drat repository to deploy to in the form :owner/:repo.

orphan

[flag] Create and force-push an orphan branch consisting of only one commit? This can be useful e.g. for path = "docs", branch = "gh-pages", but cannot be applied for pushing to the current branch.

checkout

[flag] Check out the current contents of the repository? Defaults to TRUE, set to FALSE if the build process relies on existing contents or if you deploy to a different branch.

path, branch

By default, this macro deploys the "master" branch of the drat repository. An alternative option is "gh-pages".

remote_url

[string] The URL of the remote Git repository to push to, defaults to the current GitHub repository.

commit_message

[string] Commit message to use, defaults to a useful message linking to the CI build and avoiding recursive CI runs.

commit_paths

[character] Restrict the set of directories and/or files added to Git before deploying. Default: deploy all files.

ssh_key_name

string The name of the private SSH key which should be used for deployment to the drat repo.

deploy_dev

[logical] Should development versions of packages also be deployed to the drat repo? By default only "major", "minor" and "patch" releases are build and deployed.

Deployment

Deployment can only happen to the master or gh-pages branch because the Github Pages functionality from Github is used to access the drat repository later on. You need to enable this functionality when creating the drat repository on Github via Settings -> Github pages and set it to the chosen setting here.

To build and deploy Windows binaries, builds on Travis CI with deployment permissions need to be triggered. To build and deploy macOS binaries, builds on Travis CI with deployment permissions need to be triggered. Have a look at https://docs.ropensci.org/tic/articles/deployment.html for more information and instructions.

See Also

Other macros: do_bookdown(), do_package_checks(), do_pkgdown()

Examples

Run this code
# NOT RUN {
dsl_init()

do_drat()

dsl_get()
# }

Run the code above in your browser using DataLab