Skip to content

Commit

Permalink
use git archive for release not to forget files again!
Browse files Browse the repository at this point in the history
  • Loading branch information
norbusan committed Dec 14, 2016
1 parent a075782 commit c0efce0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Makefile
@@ -1,4 +1,5 @@

PROJECT=ptex2pdf
DESTTREE ?= `kpsewhich -var-value TEXMFLOCAL`
SCRIPTVERSION = $(shell texlua ptex2pdf.lua --print-version)

Expand All @@ -16,14 +17,13 @@ install: README.md
cp README.md $(DESTTREE)/doc/latex/ptex2pdf/README

release: README.md
rm -rf ptex2pdf-$(SCRIPTVERSION)
mkdir ptex2pdf-$(SCRIPTVERSION)
cp ptex2pdf.lua COPYING ptex2pdf-$(SCRIPTVERSION)
# only ship the mark down version of readme
cp README.md ptex2pdf-$(SCRIPTVERSION)/
zip -r ptex2pdf-$(SCRIPTVERSION).zip ptex2pdf-$(SCRIPTVERSION)
tar -cJf ptex2pdf-$(SCRIPTVERSION).tar.xz ptex2pdf-$(SCRIPTVERSION)
rm -rf ptex2pdf-$(SCRIPTVERSION)
@if [ -r $(PROJECT)-$(SCRIPTVERSION).tar.gz ] ; then \
echo "$(PROJECT)-$(SCRIPTVERSION).tar.gz already there, not overwriting it!" >&2 ; \
else \
git archive --format=tar --prefix=$(PROJECT)-$(SCRIPTVERSION)/ HEAD | gzip -c > $(PROJECT)-$(SCRIPTVERSION).tar.gz ; \
echo "$(PROJECT)-$(SCRIPTVERSION).tar.gz is ready" ; \
fi


clean:
-rm -f README
Expand Down

0 comments on commit c0efce0

Please sign in to comment.