-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (29 loc) · 1.01 KB
/
Makefile
File metadata and controls
39 lines (29 loc) · 1.01 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
SHELL := /bin/bash
PKGNAME=bootGOF
help:
-@ echo "R-cmd-check: Builds and checks (--as-cran) the Rpkg"
-@ echo "test: Executes all unit-tests"
-@ echo "lint: Starts linting"
-@ echo "README: Builds README.md"
-@ echo "pkgdown: Builds pkgdown site"
NAMESPACE: R/*
Rscript -e "roxygen2::roxygenize()"
R-cmd-check: NAMESPACE
R CMD build .
R CMD check --as-cran --no-manual $(PKGNAME)*.tar.gz
make clean-pkg-build-file
make clean-cmd-check-files
clean-pkg-build-file:
rm $(PKGNAME)*tar.gz
clean-cmd-check-files:
rm -rf $(PKGNAME).Rcheck
test: NAMESPACE
Rscript -e "pkgload::load_all(); tinytest::test_all()"
coverage: NAMESPACE
Rscript -e "pkgload::load_all(); covr::package_coverage(type = 'tests')"
lint:
Rscript -e "library(tinytest); pkgload::load_all(); lintr::lint_package()"
pkgdown: NAMESPACE
Rscript -e "library(pkgdown); pkgdown::build_site_github_pages(new_process=FALSE, install=FALSE)"
README:
Rscript -e "pkgload::load_all(); rmarkdown::render(input='README.Rmd', output_format='md_document')"