-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathyml-script.Rd
94 lines (84 loc) · 2.61 KB
/
yml-script.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/yml-script.R
\name{projr_yml_script_add}
\alias{projr_yml_script_add}
\alias{projr_yml_script_rm}
\alias{projr_yml_script_rm_all}
\alias{projr_yml_script_add_pre}
\alias{projr_yml_script_add_post}
\title{Build script-related functions}
\usage{
projr_yml_script_add(
path,
title,
stage,
cue = NULL,
overwrite = TRUE,
profile = "default"
)
projr_yml_script_rm(title, path = NULL, profile = "default")
projr_yml_script_rm_all(profile = "default")
projr_yml_script_add_pre(
path,
title,
cue = NULL,
overwrite = TRUE,
profile = "default"
)
projr_yml_script_add_post(
path,
title,
cue = NULL,
overwrite = TRUE,
profile = "default"
)
}
\arguments{
\item{path}{character vector.
Path(s) to scripts, relative to project root (if not absolute).}
\item{title}{character.
Title for set of scripts.
Initial and trailing spaces are removed, and
the middle spaces are converted to dashes.
For example, \code{" a b "} is converted to
\code{"a-b"}. `}
\item{stage}{"pre" or "post".
Whether to run the script before or after the build.}
\item{cue}{"build", "dev", "patch", "minor" or "major".
Which minimum build level triggers the scripts.
"build" and "dev" are equivalent, and
always trigger the scripts.}
\item{overwrite}{logical.
Whether to overwrite any script settings
of the same title in the \code{projr}
configuration file.
If \code{FALSE} and there already exists
a key under \code{build/script} with the name
\code{title}, an error is thrown.
Default is \code{TRUE}.}
\item{profile}{character.
Profile to add the script to.
If \verb{"default"`` (the default), the script is added to the default profile, which is }_projr.yml`.}
}
\description{
Convenience functions to add or remove scripts
to run before or after the build.
\itemize{
\item .yml_script_add`: Add a script to run before or after the build.
\item .yml_script_rm`: Remove scripts to run.
}
.yml_script_add_pre\verb{ and .yml_script_add_post}
are wrappers around .yml_script_add\verb{that set the}stage\verb{argument to}"pre"\code{or}"post"\verb{, respectively. .yml_script_rm_all} removes all scripts.
}
\details{
Within a stage (pre- or post-build), scripts
are run in the order set in \verb{_projr.yml}.
They are not run in the same environment as the
build process.
The pre-build scripts are run immediately after
bumping the project version (if that is done) and immediately
before committing the present state of the code to Git.
The post-build scripts are run immediately after
committing the present state of the code to Git,
and before distributing project artefacts to the remotes.
}