11# ' Check a package on macOS
22# '
3- # ' This function first bundles a source package, then uploads it to
4- # ' <https://mac.r-project.org/macbuilder/submit.html>. This function returns a
5- # ' link to the page where the check results will appear.
3+ # ' Check on either the released or development versions of R, using
4+ # ' <https://mac.r-project.org/macbuilder/>.
5+ # '
66# '
77# ' @template devtools
88# ' @inheritParams check_win
@@ -21,11 +21,56 @@ check_mac_release <- function(
2121) {
2222 check_dots_used(action = getOption(" devtools.ellipsis_action" , rlang :: warn ))
2323
24+ check_mac(
25+ pkg = pkg ,
26+ version = " R-release" ,
27+ dep_pkgs = dep_pkgs ,
28+ args = args ,
29+ manual = manual ,
30+ quiet = quiet ,
31+ ...
32+ )
33+ }
34+
35+ # ' @rdname check_mac_release
36+ # ' @export
37+ check_mac_devel <- function (
38+ pkg = " ." ,
39+ dep_pkgs = character (),
40+ args = NULL ,
41+ manual = TRUE ,
42+ quiet = FALSE ,
43+ ...
44+ ) {
45+ check_dots_used(action = getOption(" devtools.ellipsis_action" , rlang :: warn ))
46+
47+ check_mac(
48+ pkg = pkg ,
49+ version = " R-devel" ,
50+ dep_pkgs = dep_pkgs ,
51+ args = args ,
52+ manual = manual ,
53+ quiet = quiet ,
54+ ...
55+ )
56+ }
57+
58+ check_mac <- function (
59+ pkg = " ." ,
60+ version = c(" R-devel" , " R-release" ),
61+ dep_pkgs = character (),
62+ args = NULL ,
63+ manual = TRUE ,
64+ quiet = FALSE ,
65+ ...
66+ ) {
2467 pkg <- as.package(pkg )
2568
69+ version <- match.arg(version , several.ok = FALSE )
70+
2671 if (! quiet ) {
2772 cli :: cli_inform(c(
28- " Building macOS version of {.pkg {pkg$package}} ({pkg$version})" ,
73+ " Checking macOS version of {.pkg {pkg$package}} ({pkg$version})" ,
2974 i = " Using https://mac.r-project.org/macbuilder/submit.html."
3075 ))
3176 }
@@ -56,7 +101,10 @@ check_mac_release <- function(
56101 url <- " https://mac.r-project.org/macbuilder/v1/submit"
57102
58103 rlang :: check_installed(" httr" )
59- body <- list (pkgfile = httr :: upload_file(built_path ))
104+ body <- list (
105+ pkgfile = httr :: upload_file(built_path ),
106+ rflavor = tolower(version )
107+ )
60108
61109 if (length(dep_built_paths ) > 0 ) {
62110 uploads <- lapply(dep_built_paths , httr :: upload_file )
0 commit comments