From 11101de198d36f85fdb2f6c17fa41f3754690dc4 Mon Sep 17 00:00:00 2001 From: Adrian Perez de Castro Date: Wed, 19 Feb 2020 13:05:55 +0200 Subject: [PATCH] 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. --- .gitattributes | 3 +++ make-dist | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100644 .gitattributes create mode 100755 make-dist diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..70f26a4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +/.gitignore export-ignore +/.travis.yml export-ignore +/make-dist export-ignore diff --git a/make-dist b/make-dist new file mode 100755 index 0000000..fef95da --- /dev/null +++ b/make-dist @@ -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"