-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
44 lines (33 loc) · 1002 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
37
38
39
40
41
42
43
44
R := R
RCMD := $(R) --slave
document:
@$(RCMD) -e "devtools::document()"
test:
@$(RCMD) -e "devtools::test()"
check:
@$(RCMD) -e "devtools::check()"
revcheck:
@$(RCMD) -e "if (!requireNamespace('revdepcheck')) install.packages('revdepcheck')"
@$(RCMD) -e "revdepcheck::revdep_check()"
@$(RCMD) -f "revdep/check.R"
revcheck_reset:
@$(RCMD) -e "revdepcheck::revdep_reset()"
crancheck: document
@$(R) CMD build .
@$(R) CMD check *.tar.gz
install:
$(R) CMD INSTALL ./
clean:
@rm -rf *.tar.gz *.Rcheck revdep
README.md: README.Rmd
$(RCMD) -e "rmarkdown::render('$^')"
rm README.html
BRANCH := $(shell git branch --show-current | sed 's/[a-z]*\///')
releasePRs:
@echo Creating PR to master
@gh pr create -a "@me" -b "" -B master -l "release" -p "Tom" -t "Release $(BRANCH)"
@echo Creating PR to dev
@gh pr create -a "@me" -b "" -B dev -l "release" -p "Tom" -t "Release $(BRANCH) into dev"
site: README.md document install
@cp NEWS.Md NEWS.md
@$(RCMD) -e "pkgdown::build_site()"