X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=makedist;fp=makedist;h=a4fc7963996258629f937491e5bbdee9111db83d;hb=93f0c7dfccc4277d61113115c7eb1aa7cb048413;hp=0000000000000000000000000000000000000000;hpb=be69a4fc0c240c2772a0f0bf0955b39783e4c48a;p=meta4ra.git diff --git a/makedist b/makedist new file mode 100755 index 0000000..a4fc796 --- /dev/null +++ b/makedist @@ -0,0 +1,32 @@ +#!/bin/sh -ex + +cur=$(pwd) +tmp=$(mktemp -d) +release=$1 +[ -n "$release" ] + +git clone . $tmp/meta4ra-$release +cd $tmp/meta4ra-$release +git checkout v$release + +echo v$release > VERSION + +go mod vendor +find . -name .gitignore -delete + +rm -rf .git makedist +find . -type d -exec chmod 755 {} + +find . -type f -exec chmod 644 {} + +chmod +x bin/meta4ra-hashes-detect contrib/mk-meta4 build build-with-thirdparty + +cd .. +tar cvf meta4ra-"$release".tar --uid=0 --gid=0 --numeric-owner meta4ra-"$release" +zstd -19 -v meta4ra-"$release".tar +tarball=meta4ra-"$release".tar.zst +ssh-keygen -Y sign -f ~/.ssh/sign/meta4ra@stargrave.org -n file $tarball +meta4ra-create -fn "$tarball" -mtime "$tarball" \ + -sig-ssh "$tarball".sig \ + http://www.meta4ra.stargrave.org/download/"$tarball" \ + http://y.www.meta4ra.stargrave.org/download/"$tarball" < "$tarball" > "$tarball".meta4 + +mv $tmp/$tarball $tarball.meta4 $cur/www/download