From a2917f353321394ce0185e7bf98fd3a6a982f83b Mon Sep 17 00:00:00 2001 From: Stephan Lachnit Date: Thu, 21 Jan 2021 20:37:18 +0100 Subject: [PATCH] add script to create release tarball Signed-off-by: Stephan Lachnit --- .gitignore | 3 +++ create-release-tarball.sh | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100755 create-release-tarball.sh diff --git a/.gitignore b/.gitignore index 763d25f..4174475 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,6 @@ # template.tex output # move to *.pdf once manual is done template.pdf + +# release tarballs +moderncv-*.tar.gz diff --git a/create-release-tarball.sh b/create-release-tarball.sh new file mode 100755 index 0000000..b46b7cd --- /dev/null +++ b/create-release-tarball.sh @@ -0,0 +1,18 @@ +#!/bin/sh +# script to create a tarball for the files that should be in the CTAN upload + +# fetch version via git +VERSION=$(git describe --tags --dirty) +TARBALL=moderncv-$VERSION.tar + +# remove existing tarballs +rm -f $TARBALL $TARBALL.gz + +# create tar with all files in git repo +git archive HEAD > $TARBALL + +# remove git specific files +tar -f $TARBALL --delete .github/ .gitignore create-release-tarball.sh + +# compress +gzip $TARBALL