From aa9029de996ef3cf86c5a7134401f6352b22d3dc Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 17 Sep 2023 11:35:50 -0700 Subject: [PATCH] Add scripts/gen-tarball.sh --- .gitignore | 2 ++ scripts/gen-tarball.sh | 11 +++++++++++ 2 files changed, 13 insertions(+) create mode 100755 scripts/gen-tarball.sh diff --git a/.gitignore b/.gitignore index 3a696efc..c0c091a2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ /build* +/libdeflate-*-windows-* +/libdeflate-*.tar.gz cscope* tags diff --git a/scripts/gen-tarball.sh b/scripts/gen-tarball.sh new file mode 100755 index 00000000..7ef43b3b --- /dev/null +++ b/scripts/gen-tarball.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# Generate a source tarball from the git repository. + +commit=HEAD +prefix="libdeflate-$(git describe $commit | sed 's/^v//')" +tarball="${prefix}.tar.gz" + +git archive --format=tar --prefix="${prefix}/" "$commit" \ + | libdeflate-gzip -12 > "$tarball" +echo "Generated $tarball"