Skip to content

Commit

Permalink
Add scripts/gen-tarball.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ebiggers committed Sep 17, 2023
1 parent dd12ff2 commit aa9029d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/build*
/libdeflate-*-windows-*
/libdeflate-*.tar.gz
cscope*
tags
11 changes: 11 additions & 0 deletions scripts/gen-tarball.sh
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit aa9029d

Please sign in to comment.