package-source.bash: archive HEAD instead of master

To be able to check out an older version and create
a tarball from it, let `git archive` operate on HEAD.

This used to be broken in a bad way: we use `git describe`
which operates on HEAD to name the tarball, but always archived
HEAD.
This commit is contained in:
Jakob Unterwurzacher 2018-01-07 22:29:02 +01:00
parent 1ae218b417
commit 025f33e366

View File

@ -6,7 +6,7 @@ git_archive_extra() {
local PREFIX=$1
shift
# Add files tracked in git
git archive --prefix "$PREFIX/" -o $PREFIX.tar master
git archive --prefix "$PREFIX/" -o $PREFIX.tar HEAD
# Add "extra" files
tar --transform "s!^!$PREFIX/!" --append -f $PREFIX.tar "$@"
# Compress