Skip to content

Commit 0490f36

Browse files
committed
Set/unset the AS_CRAN environmental variable.
Setting this variable here means that we can check it from README.Rmd to decide if to write out a link or not. See Luminescence issue 1478.
1 parent 13af9b3 commit 0490f36

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

R/build_package.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ build_package <- function(
4949
# Prebuild scripts ----------------------------------------------------------------------------
5050
cli::cat_rule("Pre-build housekeeping")
5151

52+
## set the AS_CRAN environmental variable (see Luminescence issue #1478)
53+
Sys.setenv(AS_CRAN = as_cran)
54+
5255
##overwrite or create .Rbuildignore and add package stuff
5356
##TODO might become part of an own module
5457
if(!as_cran[1] & write_Rbuildignore){
@@ -218,4 +221,6 @@ build_package <- function(
218221

219222
}
220223

224+
## unset the AS_CRAN environmental variable
225+
Sys.setenv(AS_CRAN = "")
221226
}

0 commit comments

Comments
 (0)