-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (34 loc) · 984 Bytes
/
Makefile
File metadata and controls
47 lines (34 loc) · 984 Bytes
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
default: all
all: build_data update_deps package docs man/figures/logo.png README.md check_package git_commit
#Update data
.PHONY: build_data
build_data:
cd data-raw && make
## Update dependencies based on those installed
.PHONY: update_deps
update_deps:
Rscript -e "usethis::use_tidy_versions(overwrite = TRUE)"
#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
## Check package locally
.PHONY: check_package
check_package:
Rscript -e "devtools::check()"
#Commit updates
.PHONY: git_commit
git_commit:
git add --all
git commit -m "$(message)"
git push