-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·38 lines (32 loc) · 1014 Bytes
/
Makefile
File metadata and controls
executable file
·38 lines (32 loc) · 1014 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
# Determine package name and version from DESCRIPTION file
PKG_VERSION=$(shell grep -i ^version DESCRIPTION | cut -d : -d \ -f 2)
PKG_NAME=$(shell grep -i ^package DESCRIPTION | cut -d : -d \ -f 2)
# Name of built package
PKG_TAR=$(PKG_NAME)_$(PKG_VERSION).tar.gz
# Install package
.PHONY: install
install:
cd .. && R CMD INSTALL $(PKG_NAME)
# Build documentation with roxygen
# 1) Remove old doc
# 2) Generate documentation
.PHONY: roxygen
roxygen:
rm -f man/*.Rd
cd .. && Rscript -e "library(roxygen2); roxygenize('$(PKG_NAME)')"
# Build and check package
.PHONY: check
check:
cd .. && R CMD build $(PKG_NAME)
cd .. && _R_CHECK_CRAN_INCOMING_=FALSE R CMD check \
--no-stop-on-test-error --as-cran --run-dontrun $(PKG_TAR)
# Run static code analysis
.PHONY: lintr
lintr:
Rscript \
-e "library(lintr)" \
-e "lint_package(linters = with_defaults(object_name_linter = NULL, \
object_usage_linter = NULL))"
.PHONY: deploy
deploy:
Rscript "shinyapps-io/deploy.R"