-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (61 loc) · 2.15 KB
/
Makefile
File metadata and controls
76 lines (61 loc) · 2.15 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
.DEFAULT_GOAL := check
.PHONY: check check-fast build build-vignettes document coverage install lint format clean help site deploy install-pre-commit-hook
DOCUMENT_CMD = Rscript -e "devtools::document()"
BUILD_CMD = Rscript -e "devtools::build()"
CHECK_CMD = Rscript -e "devtools::check()"
CHECK_FAST_CMD = Rscript -e "devtools::check(build_args = '--no-build-vignettes', args = '--no-vignettes')"
BUILD_VIGNETTES_CMD = Rscript -e "devtools::build_vignettes()"
TEST_CMD = Rscript -e "devtools::test()"
COVERAGE_CMD = Rscript -e "covr::package_coverage() |> print()"
INSTALL_CMD = Rscript -e "devtools::install()"
LINT_CMD = Rscript -e "lintr::lint_package()"
SITE_CMD = Rscript -e "pkgdown::build_site()"
DEPLOY_CMD = Rscript -e "pkgdown::deploy_to_branch()"
help:
@echo "prolfqua development targets:"
@echo " make check - R CMD check (runs document, build first)"
@echo " make check-fast - R CMD check without rebuilding vignettes during check"
@echo " make install - install package locally"
@echo " make lint - run lintr"
@echo " make format - format package with air"
@echo " make install-pre-commit-hook - install local pre-commit hook"
@echo " make clean - remove build artifacts"
@echo ""
@echo "Advanced:"
@echo " make document - generate roxygen2 docs"
@echo " make build - build tarball"
@echo " make build-vignettes - build vignettes into inst/doc"
@echo " make coverage - code coverage report"
@echo " make site - build pkgdown site locally"
@echo " make deploy - build pkgdown site and push to gh-pages"
document:
$(DOCUMENT_CMD)
build: document
$(BUILD_CMD)
check: build
$(CHECK_CMD)
build-vignettes: document
$(BUILD_VIGNETTES_CMD)
mkdir -p inst/doc
cp doc/*.html doc/*.Rmd doc/*.R inst/doc/ 2>/dev/null || true
check-fast: document
$(CHECK_FAST_CMD)
coverage: document
$(COVERAGE_CMD)
install: document
$(INSTALL_CMD)
lint:
$(LINT_CMD)
format:
air format .
install-pre-commit-hook:
cp ".githooks/pre-commit" ".git/hooks/pre-commit"
chmod +x ".git/hooks/pre-commit"
site: document
$(SITE_CMD)
deploy: document
$(DEPLOY_CMD)
clean:
rm -rf *.Rcheck
rm -f Rplots.pdf
rm -rf inst/doc doc Meta