Skip to contents

Add a local directory as a destination to a _projr.yml file.

Usage

projr_yml_dest_add_local(
  title,
  content,
  path,
  structure = NULL,
  path_append_label = NULL,
  overwrite = TRUE,
  send_cue = NULL,
  send_sync_approach = NULL,
  send_version_source = NULL,
  send_conflict = NULL,
  profile = "default"
)

Arguments

title

character. The name of the directory. Has no effect besides helping structure _projr.yml. If not supplied, will be made equal to content.

content

character vector. Labels of directories to include in the upload. Options are the labels of directories in the active projr configuration, as well as "docs", "data" and "code". "docs" means the directory where the documents are rendered to, "data" means the files in the "data" directory, and "code" means all files tracked by the Git repository.

path

character. Path to the directory. If a relative path is given, then it is taken as relative to the project home directory. Must be supplied.

structure

"latest" or "version". Structure of the remote. If "latest", then path simply contains the latest versions of the contents. If "version", then path will contain a directory for each version. If not supplied, will be version.

path_append_label

logical. Whether to append the label to the path. If TRUE, then the label will be appended to path. If FALSE, then the path will be the path to the label. If not set, then will be treated as TRUE.

overwrite

logical. Whether to rewrite an existing entry of the same title in the specified projr configuration file. Default is TRUE.

send_cue

TRUE/FALSE, or one of "build", "dev", "patch", "minor" or "major". Minimum component bumped in a project build to initiate the upload. If TRUE, then will be set to "patch". If FALSE, then will never be uploaded. If "build", then will be uploaded on every build, including dev builds, so dev and "build" are equivalent.

send_sync_approach

"upload-all", "upload-missing", "sync-using-deletiong" and "sync-using-version". How to synchronise to the remote. If upload-all, then all files are uploaded. If upload-missing, then only missing files are uploaded. If sync-using-deletion, then all files on the remote are deleted before uploading all local files. If sync-using-version, then files that have changed or been added locally are uploaded to the remote, and files that have been removed locally are removed from the remote. If not set, then "sync-using-version" will be used.

send_version_source

"manifest" or "file". For sync-using-version synchronisation approach, whether to use the recorded versions of objects to determine what has changed ("manifest"), or to download everything from the remote, version it and compare it to what's in the local folder ("file"). If not set, then "manifest" is used.

send_conflict

"overwrite", "error" or "skip". What to do if a file that is to be uploaded to the remote is already on the remote. Default is "overwrite".

profile

character. Profile to write the settings to. If "default", then written to _projr.yml, otherwise written to _projr-<profile>.yml. The default is "default".