From abcb9ff3cc7262a1d8c89f83a7ec8da6c813d41a Mon Sep 17 00:00:00 2001 From: Janus Valberg-Madsen Date: Fri, 5 Oct 2018 15:18:41 +0200 Subject: [PATCH] Add make targets for building release zips --- .gitignore | 3 +++ Makefile | 19 +++++++++++++++---- latex-template/da/Makefile | 7 ++++++- latex-template/en/Makefile | 7 ++++++- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index e6598ba..d1838f8 100644 --- a/.gitignore +++ b/.gitignore @@ -240,3 +240,6 @@ TSWLatexianTemp* # generated if using elsarticle.cls *.spl + +# Build folder for preparing GitHub releases +build/ diff --git a/Makefile b/Makefile index 2cc149e..96fe3ce 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,14 @@ PDFS := $(RMDS:.Rmd=.pdf) all: latex notes +release: clean-build + mkdir -p build + for dir in $(TEMPLATES); do \ + $(MAKE) -C $$dir release; \ + echo build/`basename $$dir`.zip; \ + (cd $$dir && zip -r - . -x Makefile) > build/`basename $$dir`.zip; \ + done + latex: for dir in $(TEMPLATES); do \ $(MAKE) -C $$dir; \ @@ -18,13 +26,16 @@ latex: notes: $(PDFS) %.pdf: %.Rmd - cd resources; \ + cd resources Rscript --slave --vanilla -e "rmarkdown::render('$(