2020-06-12 18:32:13 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
#
|
|
|
|
# create signed release tarball with submodules bundled
|
2022-11-02 13:32:31 +00:00
|
|
|
# usage: ./contrib/tarball.sh [keyid]
|
2020-06-12 18:32:13 +00:00
|
|
|
#
|
|
|
|
repo=$(readlink -e $(dirname $0)/..)
|
|
|
|
branch=$(test -e $repo/.git/ && git rev-parse --abbrev-ref HEAD)
|
|
|
|
out="lokinet-$(git describe --exact-match --tags $(git log -n1 --pretty='%h') 2> /dev/null || ( echo -n $branch- && git rev-parse --short HEAD)).tar.xz"
|
2022-11-02 13:32:31 +00:00
|
|
|
git-archive-all -C $repo --force-submodules $out && rm -f $out.sig && (gpg -u ${1:-jeff@lokinet.io} --sign --detach $out &> /dev/null && gpg --verify $out.sig)
|