From 397a525f2e635d9790de607feeefd8b4f1e9b468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Wed, 13 Nov 2024 16:37:23 +0100 Subject: [PATCH] Simple source() to install dev or rc version [ci skip] --- tools/pkgdown/assets/install.R | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/pkgdown/assets/install.R b/tools/pkgdown/assets/install.R index b1421b548..3214e2113 100644 --- a/tools/pkgdown/assets/install.R +++ b/tools/pkgdown/assets/install.R @@ -10,8 +10,18 @@ } stream <- "stable" - if (!is.null(source_arg) && grepl("\\?stream=[a-z]+$", source_arg)) { - stream <- sub("^.*\\?stream=", "", source_arg) + if (!is.null(source_arg)) { + if (grepl("\\?stream=[a-z]+$", source_arg)) { + stream <- sub("^.*\\?stream=", "", source_arg) + } else if (grepl("\\?dev$", source_arg) || grepl("\\?devel$", source_arg)) { + stream <- "devel" + } else if (grepl("\\?rc$", source_arg)) { + stream <- "rc" + } + } + + if (stream == "dev") { + stream <- "devel" } message("Installing pak from stream ", stream, ".")