2017-11-01 18:58:10 +01:00
|
|
|
#!/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)
|
2017-11-01 20:05:15 +01:00
|
|
|
PREFIX=gocryptfs_${GITVERSION}_src-deps
|
2017-11-01 18:58:10 +01:00
|
|
|
|
|
|
|
dep ensure
|
2017-11-01 19:41:47 +01:00
|
|
|
echo $GITVERSION > VERSION
|
2017-11-01 18:58:10 +01:00
|
|
|
git_archive_extra $PREFIX VERSION vendor
|
2017-11-01 19:41:47 +01:00
|
|
|
rm VERSION
|
2017-11-01 18:58:10 +01:00
|
|
|
|
|
|
|
echo "Tar created."
|
|
|
|
echo "Hint for signing: gpg -u 23A02740 --armor --detach-sig $PREFIX.tar.gz"
|