-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
37 lines (26 loc) · 798 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
# Building and deployment of the package
# This file assumes that the user has bump2version installed:
# https://pypi.org/project/bump2version/
version := patch
ROOT_DIR := $(shell basename $(dir $(abspath $$PWD)))
PKG := $(shell find . -type f -name "$(ROOT_DIR)*.tar.gz")
BRANCH:= $(shell git rev-parse --symbolic-full-name --abbrev-ref HEAD)
all: clean test docs build check
clean:
- rm -r $(ROOT_DIR).Rcheck $(PKG)
test:
Rscript -e 'testthat::test_local("$(ROOT_DIR)")'
docs: clean
Rscript -e 'roxygen2::roxygenise("$(ROOT_DIR)")'
build: docs
R CMD build $(ROOT_DIR)
check: build
R CMD check $(PKG)
install: build check
R CMD install .
bump:
git checkout $(BRANCH)
git pull origin $(BRANCH)
bumpversion $(version)
git push origin $(BRANCH) --follow-tags
.PHONY=clean bump