Add package-source.sh helper

Automates creating a source tarball with the right
folder name inside
This commit is contained in:
Jakob Unterwurzacher 2018-01-28 15:19:42 +01:00 committed by rfjakob
parent db76b3b856
commit 5c9d739b32

11
package-source.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash -eux
# Get git version, something like "v1.2.3"
GITVERSION=$(git describe --tags --dirty)
# Drop leading "v" to get just "1.2.3"
VERSION=${GITVERSION#v}
# Folder name inside the tarball should be "encfs-1.2.3"
PREFIX="encfs-$VERSION"
# Actually create archive
git archive --prefix "$PREFIX/" -o $PREFIX.tar.gz HEAD