Skip to content

Commit

Permalink
Update build to skip vignette run on CRAN.
Browse files Browse the repository at this point in the history
  • Loading branch information
tillahoffmann committed Dec 16, 2023
1 parent d1f0d3b commit 7d534f4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
1 change: 0 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ Makefile
^check$
^CRAN-SUBMISSION$
^cran-comments\.md$

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
inst/doc
vignettes/getting_started
*.html
check
.vscode
build
.DS_Store
24 changes: 13 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
.PHONY : build check man vignettes
.PHONY : build clean

vignettes/getting_started.html : vignettes/getting_started.Rmd vignettes/getting_started.stan
Rscript -e "devtools::build_rmd('$<')"
build : build/gptoolsStan

man :
build/gptoolsStan :
# Update documentation.
Rscript -e 'devtools::document()'
# Clean up an potential previous builds and create a clean directory.
rm -rf build && mkdir -p build
# Build, check, and extract the package.
cd build \
&& NOT_CRAN=true R CMD build .. \
&& R CMD check --as-cran *.tar.gz \
&& tar -xf *.tar.gz

build :
mkdir -p build
cd build && R CMD build ..

check : build
mkdir -p check
cd check && R CMD check --as-cran ../build/*.tar.gz
clean :
rm -rf build
5 changes: 4 additions & 1 deletion vignettes/getting_started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ vignette: >
%\VignetteIndexEntry{Getting Started with gptools in R}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
params:
EVAL: !r identical(Sys.getenv("NOT_CRAN"), "true")
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
comment = "#>",
eval = params$EVAL
)
```

Expand Down

0 comments on commit 7d534f4

Please sign in to comment.