Skip to content

Commit

Permalink
package-source.bash: archive HEAD instead of master
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rfjakob committed Jan 7, 2018
1 parent 1ae218b commit 025f33e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion package-source.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 025f33e

Please sign in to comment.