Skip to content
Snippets Groups Projects
Unverified Commit 9d9ffd04 authored by neze's avatar neze
Browse files

makerelease

parent 58548183
No related branches found
No related tags found
No related merge requests found
......@@ -160,3 +160,4 @@ pythontex-files-*/
TSWLatexianTemp*
*.swp
release/
# 2
## 2.0
### 2.0.0-beta
Changed the whole layout, based on models from the Direction of Communication at
the École polytechnique.
# 1
## 1.0
### 1.0.0
Basic beamer package, based on the `Berkeley` theme.
#!/bin/bash
getversion () {
git describe --tags --match "v*" --long --dirty --abbrev=8 2>/dev/null
}
getreponame () {
git remote -v | grep origin | head -n1 | sed 's/\.git\s.*$//; s%^.*/%%'
}
mkdir -p release/
archname="$(getreponame)-$(getversion)";
find release/ -name "$archname"'.*' -delete
archname="release/$archname";
tgzname="$archname.tar.gz";
zipname="$archname.zip";
make cleandist &&
make &&
{
find . -type f -name '*.tex'\
-or -name '*.pdf'\
-or -name '*.sty'\
-or -name '*.jpg'\
-or -name '*.md'\
-or -name 'LICENSE*'
} | tee >(xargs -d'\n' tar czf "$tgzname") >(xargs -d'\n' zip -q "$zipname") | cat - &&
gpg2 --armor --output "$zipname.asc" --detach-sign "$zipname" &&
gpg2 --armor --output "$tgzname.asc" --detach-sign "$tgzname"
.PHONY: all clean cleandist %.clean
TEXFILES:=$(shell find . -type f -name '*.tex')
all: $(patsubst %.tex,%.pdf,$(TEXFILES))
%.pdf: %.tex
pdflatex -interaction=nonstopmode $<
pdflatex -interaction=nonstopmode $<
pdflatex -interaction=nonstopmode $<
clean: $(patsubst %.tex,%.clean,$(TEXFILES))
%.clean:
find -name '$*.*' | grep -Ev "\.tex$$|\.pdf$$" | xargs rm -f
cleandist: $(patsubst %.tex,%.cleandist,$(TEXFILES))
%.cleandist: %.clean
rm -f $*.pdf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment