make-dist: Add script to generate release tarballs

Because the source archives from GitHub tags may not always produce the
same tarball when fetching at different times. Having proper tarballs
for releases also allows signing them i.e. with PGP.
pull/112/head
Adrian Perez de Castro 2020-02-19 13:05:55 +02:00
parent 58fecc865d
commit 11101de198
No known key found for this signature in database
GPG Key ID: 91C559DBE4C9123B
2 changed files with 13 additions and 0 deletions

3
.gitattributes vendored Normal file
View File

@ -0,0 +1,3 @@
/.gitignore export-ignore
/.travis.yml export-ignore
/make-dist export-ignore

10
make-dist Executable file
View File

@ -0,0 +1,10 @@
#! /bin/sh
set -e
GIT_TAG=$(git describe --tags HEAD)
VERSION=${GIT_TAG#v}
PV="ngx-fancyindex-${VERSION}"
set -x
git archive --worktree-attributes --prefix="${PV}/" -o "${PV}.tar" "${GIT_TAG}"
xz -f9 "${PV}.tar"