diff options
author | Jakob Unterwurzacher | 2017-11-01 18:58:10 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-11-01 18:58:10 +0100 |
commit | 39839ade70035de32084a170faac2a93a771db38 (patch) | |
tree | 9a78a091eba530cecb1daf8ac73f9f6ad6109b30 /package-source.bash | |
parent | 9a3791fbc1e3422f06bdd3b63868aa28c04267c3 (diff) |
Add source packaging script
Diffstat (limited to 'package-source.bash')
-rwxr-xr-x | package-source.bash | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/package-source.bash b/package-source.bash new file mode 100755 index 0000000..31fe98c --- /dev/null +++ b/package-source.bash @@ -0,0 +1,25 @@ +#!/bin/bash -eu + +# git_archive_extra PREFIX EXTRA1 [EXTRA2 ...] +# Call git-archive and add additional files to the tarball. +git_archive_extra() { + local PREFIX=$1 + shift + # Add files tracked in git + git archive --prefix "$PREFIX/" -o $PREFIX.tar master + # Add "extra" files + tar --transform "s!^!$PREFIX/!" --append -f $PREFIX.tar "$@" + # Compress + gzip -f $PREFIX.tar +} + +cd "$(dirname "$0")" + +GITVERSION=$(git describe --tags --dirty) +PREFIX=gocryptfs_${GITVERSION}_src+deps + +dep ensure +git_archive_extra $PREFIX VERSION vendor + +echo "Tar created." +echo "Hint for signing: gpg -u 23A02740 --armor --detach-sig $PREFIX.tar.gz" |