My usual source release script create a tar archive from git and then add a version file:
echo "0.9.2" > .tarball-version touch --date="$(git log -n 1 --pretty=format:%ci)" .tarball-version git archive --format=tar --prefix=glogg-0.9.2/ v0.9.2 >glogg-0.9.2.tmp tar --append -f glogg-0.9.2.tmp --transform s_^_glogg-0.9.2/_ .tarball-version gzip -n < glogg-0.9.2.tmp > glogg-0.9.2.tar.gz rm .tarball-version glogg-0.9.2.tmp
Since recently I have a rather strange error when trying to append the file:
tar: value 16777434 out of uid_t range 0..2097151 tar: Exiting with failure status due to previous errors
I understand from 7zip is incompatible with tar format created by git archive git-archive only generate old-style tar file but is there a way to tell it to pass options to tar to create gnu (or posix) style files?
Alternatively, does anybody know an elegant solution to do what I am doing in my script? (unpacking/repacking maybe? But would it keep date and comments?)