generated from nedhmn/r-workspace-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (25 loc) · 857 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
# Set shell to Git Bash
SHELL := C:/Program\ Files/Git/bin/bash.exe
.SHELLFLAGS := -c
CURRENT_DIR := $(PWD)
# Build target
build:
R --quiet -e "rmarkdown::render('apps/$(app)/main.Rmd', output_file = 'README.md', knit_root_dir = '$(CURRENT_DIR)')"
# Renv commands
renv-snapshot:
R --quiet -e "renv::snapshot()"
renv-restore:
R --quiet -e "renv::restore()"
renv-update:
R --quiet -e "renv::update()"
renv-status:
R --quiet -e "renv::status()"
# Help
help:
@echo "Commands:"
@echo " make build filename=<name> Build README for app"
@echo " make renv-snapshot Save current environment"
@echo " make renv-restore Restore from lockfile"
@echo " make renv-update Update packages"
@echo " make renv-status Check environment status"
.PHONY: build renv-snapshot renv-restore renv-update renv-status help