-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
45 lines (34 loc) · 949 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
45
default: all
all: update_deps build_data package docs man/figures/logo.png README.md build_report git_commit
## Update dependencies based on those installed
.PHONY: update_deps
update_deps:
Rscript -e "usethis::use_tidy_versions(overwrite = TRUE)"
#Update data
.PHONY: build_data
build_data:
cd data-raw && make
#build update documents and build package
.PHONY: package
package:
R CMD INSTALL --no-multiarch --with-keep.source .
.PHONY: docs
docs:
Rscript -e 'devtools::document(roclets=c('rd', 'collate', 'namespace'))'
#update logo
man/figures/logo.png: inst/scripts/generate_hex_sticker.R
Rscript inst/scripts/generate_hex_sticker.R
#update readme
README.md: README.Rmd
Rscript -e 'rmarkdown::render("README.Rmd")' && \
rm README.html
#generate pknet report
.PHONY: build_report
build_report:
cd pkgnet && make
#Commit updates
.PHONY: git_commit
git_commit:
git add --all
git commit -m "$(message)"
git push