forked from looker-open-source/lookr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (29 loc) · 957 Bytes
/
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
PREFIX ?= /usr/local/bin
PKGNAME = `sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION`
PKGVERS = `sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION`
install: doc
R CMD INSTALL .
make test
develop:
tmux split-window -v -c "#{pane_current_path}" 'R' && \
tmux send-keys "setwd(Sys.getenv('PWD')); devtools::load_all('.')" Enter
doc:
rm -rf NAMESPACE
Rscript -e "setwd(Sys.getenv('PWD')); devtools::document(roclets = c('rd', 'collate', 'namespace'))"
test:
Rscript -e "setwd(Sys.getenv('PWD')); devtools::load_all(); devtools::test()"
test-continuous:
find R/ tests/testthat/ -type f -name "*.R" | entr make test
pkgdown:
Rscript -e 'pkgdown::build_site()'
open docs/index.html
version_patch:
Rscript -e 'usethis::use_version("patch")'
version_minor:
Rscript -e 'usethis::use_version("minor")'
version_major:
Rscript -e 'usethis::use_version("major")'
build:
R CMD build .
check: build
R CMD check --no-manual $(PKGNAME)_$(PKGVERS).tar.gz