-
Notifications
You must be signed in to change notification settings - Fork 762
Expand file tree
/
Copy pathremotes.R
More file actions
185 lines (170 loc) · 5.32 KB
/
remotes.R
File metadata and controls
185 lines (170 loc) · 5.32 KB
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#' Deprecated package installation functions
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' These functions have been deprecated in favor of [pak](https://pak.r-lib.org/),
#' as that is what we now recommend for package installation. There are a few
#' functions which have no pak equivalent, where you can instead call the
#' old remotes functions directly.
#'
#' ## Migration guide
#'
#' | devtools function | Replacement |
#' |-------------------|-------------|
#' | `install_bioc("pkg")` | `pak::pak("bioc::pkg")` |
#' | `install_bitbucket("user/repo")` | `remotes::install_bitbucket("user/repo")` |
#' | `install_cran("pkg")` | `pak::pak("pkg")` |
#' | `install_dev("pkg")` | `remotes::install_dev("pkg")` |
#' | `install_git("url")` | `pak::pak("git::url")` |
#' | `install_github("user/repo")` | `pak::pak("user/repo")` |
#' | `install_gitlab("user/repo")` | `pak::pak("gitlab::user/repo")` |
#' | `install_local("path")` | `pak::pak("local::path")` |
#' | `install_svn("url")` | `remotes::install_svn("url")` |
#' | `install_url("url")` | `pak::pak("url::url")` |
#' | `install_version("pkg", "1.0.0")` | `pak::pak("[email protected]")` |
#' | `update_packages("pkg")` | `pak::pak("pkg")` |
#' | `dev_package_deps()` | `pak::local_dev_deps()` |
#' | `github_pull("123")` | `remotes::github_pull("123")` |
#' | `github_release()` | `remotes::github_release()` |
#'
#' @name install-deprecated
#' @keywords internal
NULL
#' @rdname install-deprecated
#' @export
install_bioc <- function(...) {
lifecycle::deprecate_warn(
"2.5.0",
"install_bioc()",
I('pak::pak("bioc::pkg")')
)
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_bioc(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_bitbucket <- function(...) {
lifecycle::deprecate_warn(
"2.5.0",
"install_bitbucket()",
"remotes::install_bitbucket()"
)
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_bitbucket(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_cran <- function(...) {
lifecycle::deprecate_warn("2.5.0", "install_cran()", "pak::pak()")
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_cran(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_dev <- function(...) {
lifecycle::deprecate_warn("2.5.0", "install_dev()", "remotes::install_dev()")
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_dev(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_git <- function(...) {
lifecycle::deprecate_warn("2.5.0", "install_git()", I('pak::pak("git::url")'))
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_git(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_github <- function(...) {
lifecycle::deprecate_warn(
"2.5.0",
"install_github()",
I('pak::pak("user/repo")')
)
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_github(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_gitlab <- function(...) {
lifecycle::deprecate_warn(
"2.5.0",
"install_gitlab()",
I('pak::pak("gitlab::user/repo")')
)
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_gitlab(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_local <- function(...) {
lifecycle::deprecate_warn(
"2.5.0",
"install_local()",
I('pak::pak("local::path")')
)
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_local(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_svn <- function(...) {
lifecycle::deprecate_warn("2.5.0", "install_svn()", "remotes::install_svn()")
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_svn(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_url <- function(...) {
lifecycle::deprecate_warn("2.5.0", "install_url()", I('pak::pak("url::url")'))
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_url(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
install_version <- function(...) {
lifecycle::deprecate_warn(
"2.5.0",
"install_version()",
I('pak::pak("pkg@version")')
)
check_installed("remotes")
pkgbuild::with_build_tools(remotes::install_version(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
update_packages <- function(...) {
lifecycle::deprecate_warn("2.5.0", "update_packages()", "pak::pak()")
check_installed("remotes")
pkgbuild::with_build_tools(remotes::update_packages(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
dev_package_deps <- function(...) {
lifecycle::deprecate_warn(
"2.5.0",
"dev_package_deps()",
"pak::local_dev_deps()"
)
check_installed("remotes")
pkgbuild::with_build_tools(remotes::dev_package_deps(...), required = FALSE)
}
#' @rdname install-deprecated
#' @export
github_pull <- function(...) {
lifecycle::deprecate_warn("2.5.0", "github_pull()", "remotes::github_pull()")
check_installed("remotes")
remotes::github_pull(...)
}
#' @rdname install-deprecated
#' @export
github_release <- function(...) {
lifecycle::deprecate_warn(
"2.5.0",
"github_release()",
"remotes::github_release()"
)
check_installed("remotes")
remotes::github_release(...)
}