-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
74 lines (55 loc) · 1.12 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
SHELL := /bin/bash
LIBDIR=/Users/kyleb/Rlibs/lib
PACKAGE=lastdose
VERSION=$(shell grep Version DESCRIPTION |awk '{print $$2}')
TARBALL=${PACKAGE}_${VERSION}.tar.gz
PKGDIR=.
CHKDIR=.
## Set libPaths:
export R_LIBS=${LIBDIR}
travis:
make build
R CMD check ${TARBALL} -o ${CHKDIR}
test:
Rscript -e 'library(testthat)' -e 'test_file("tests/testthat.R")'
rhub:
Rscript -e 'rhub::check_for_cran()'
cran:
make doc
make build
R CMD check ${TARBALL} --as-cran
covr:
Rscript inst/covr/covr.R
ec:
echo ${VERSION}
.PHONY: data
data:
Rscript inst/script/data.R
all:
make doc
make build
make install
.PHONY: doc
doc:
Rscript -e 'library(devtools); document()'
build:
R CMD build --md5 $(PKGDIR)
install:
R CMD install --install-tests ${TARBALL}
install-build:
R CMD install --build --install-tests ${TARBALL}
check:
make doc
make build
R CMD check ${TARBALL} -o ${CHKDIR}
readme:
Rscript -e 'rmarkdown::render("README.Rmd")'
site:
Rscript -e 'pkgdown::build_site()'
spelling:
Rscript inst/script/_spelling.R
bump-dev:
Rscript -e 'usethis::use_version("dev")'
tag-version:
git tag $(VERSION)
git push origin $(VERSION)