-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathggstatsplot-Makefile
More file actions
44 lines (32 loc) · 1.21 KB
/
ggstatsplot-Makefile
File metadata and controls
44 lines (32 loc) · 1.21 KB
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
PKGNAME = `sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION`
PKGVERS = `sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION`
all: check
build: install_deps
R CMD build .
check: build
R CMD check --no-manual $(PKGNAME)_$(PKGVERS).tar.gz
install_deps:
Rscript \
-e 'if (!requireNamespace("remotes")) install.packages("remotes")' \
-e 'remotes::install_deps(dependencies = TRUE)'
install: build
R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz
clean:
@rm -rf $(PKGNAME)_$(PKGVERS).tar.gz $(PKGNAME).Rcheck .local-lib README.html
update_deps:
Rscript -e 'options(repos = c(CRAN = "https://packagemanager.posit.co/cran/latest")); usethis::use_tidy_description()'
Rscript -e 'options(repos = c(CRAN = "https://packagemanager.posit.co/cran/latest")); usethis::use_latest_dependencies(source = "CRAN", overwrite = TRUE)'
Rscript -e 'roxygen2::roxygenise()'
Rscript -e 'codemetar::write_codemeta()'
document: build
mkdir -p .local-lib
R CMD INSTALL -l .local-lib $(PKGNAME)_$(PKGVERS).tar.gz
Rscript -e '.libPaths(c(normalizePath(".local-lib"), .libPaths())); rmarkdown::render("README.Rmd")'
format:
Rscript -e 'styler::style_pkg()'
lint:
Rscript -e 'lintr::lint_package()'
hooks:
prek run --all-files
hooks_install:
prek install