forked from metrumresearchgroup/yspec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·85 lines (65 loc) · 1.39 KB
/
Makefile
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
77
78
79
80
81
82
83
84
85
SHELL := /bin/bash
PACKAGE=yspec
VERSION=$(shell grep Version DESCRIPTION |awk '{print $$2}')
TARBALL=${PACKAGE}_${VERSION}.tar.gz
PKGDIR=.
CHKDIR=.
testn:
Rscript inst/validation/latest.R
# development cycle - bumps the version and tags based on version
bump-dev:
Rscript -e 'usethis::use_version("dev")'
tag-version:
git tag $(VERSION)
git push origin $(VERSION)
# also can run make package to build vignettes
all:
make data
make doc
make build
make install
.PHONY: doc
doc:
Rscript -e 'library(devtools); document()'
build:
R CMD build --md5 --no-build-vignettes $(PKGDIR)
build-vignettes:
R CMD build --md5 $(PKGDIR)
package:
make data
make doc
make build-vignettes
make install
install:
R CMD INSTALL --install-tests ${TARBALL}
check:
make data
make build
R CMD CHECK --ignore-vignettes ${TARBALL} -o ${CHKDIR}
check-package:
make data
make build-vignettes
R CMD CHECK ${TARBALL} -o ${CHKDIR}
test:
make install
Rscript -e 'testthat::test_local()'
spelling:
make doc
Rscript -e "spelling::spell_check_package('.')"
covr:
Rscript inst/script/covr.R
pkgdown:
Rscript -e 'options(pkgdown.internet = FALSE); pkgdown::build_site()'
readme:
Rscript -e 'rmarkdown::render("README.Rmd")'
ec:
echo ${VERSION}
data:
Rscript inst/test_data/data.R
install-build:
R CMD INSTALL --build --install-tests ${TARBALL}
clean:
rm *.pdf
rm *.yml
rm *.yaml
rm tests/testthat/*.pdf