]> Cypherpunks.ru repositories - gocheese.git/blobdiff - makedist.sh
More convenient trusted-host
[gocheese.git] / makedist.sh
diff --git a/makedist.sh b/makedist.sh
deleted file mode 100755 (executable)
index 87e7b6f..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-#!/bin/sh -ex
-
-cur=$(pwd)
-tmp=$(mktemp -d)
-release=$1
-[ -n "$release" ]
-
-git clone . $tmp/gocheese-$release
-cd $tmp/gocheese-$release
-git checkout v$release
-
-redo-ifchange module-name VERSION
-mod_name=`cat module-name`
-
-cat > download.texi <<EOF
-You can obtain releases source code prepared tarballs on
-@url{http://www.gocheese.cypherpunks.ru/}.
-EOF
-redo gocheese.info
-
-crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod)
-mkdir -p src/$mod_name
-mv *.go go.mod go.sum src/$mod_name
-
-mods="
-golang.org/x/crypto
-golang.org/x/net
-"
-for mod in $mods; do
-    mod_path=$(sed -n "s# // indirect## ; s#^  \($mod\) \(.*\)\$#\1@\2#p" src/$mod_name/go.mod)
-    [ -n "$mod_path" ]
-    mkdir -p src/$mod
-    ( cd $GOPATH/pkg/mod/$mod_path ; tar cf - --exclude ".git*" * ) | tar xfC - src/$mod
-    chmod -R +w src/$mod
-done
-
-for mod in golang.org/x/sys; do
-    mod_path=$(sed -n "s#^\($mod\) \(.*\) h1:.*\$#\1@\2#p" src/$mod_name/go.sum | sed /go.mod/d | sort -n -r | sed -n 1p)
-    [ -n "$mod_path" ]
-    mkdir -p src/$mod
-    ( cd $GOPATH/pkg/mod/$mod_path ; tar cf - --exclude ".git*" * ) | tar xfC - src/$mod
-    chmod -R +w src/$mod
-done
-
-cat > $tmp/includes <<EOF
-golang.org/x/crypto/AUTHORS
-golang.org/x/crypto/argon2
-golang.org/x/crypto/blake2b
-golang.org/x/crypto/CONTRIBUTORS
-golang.org/x/crypto/go.mod
-golang.org/x/crypto/go.sum
-golang.org/x/crypto/LICENSE
-golang.org/x/crypto/PATENTS
-golang.org/x/crypto/README.md
-golang.org/x/net/AUTHORS
-golang.org/x/net/CONTRIBUTORS
-golang.org/x/net/go.mod
-golang.org/x/net/go.sum
-golang.org/x/net/LICENSE
-golang.org/x/net/netutil
-golang.org/x/net/PATENTS
-golang.org/x/net/README.md
-golang.org/x/sys/AUTHORS
-golang.org/x/sys/CONTRIBUTORS
-golang.org/x/sys/cpu
-golang.org/x/sys/go.mod
-golang.org/x/sys/LICENSE
-golang.org/x/sys/PATENTS
-golang.org/x/sys/README.md
-EOF
-tar cfCI - src $tmp/includes | tar xfC - $tmp
-rm -fr src/golang.org $tmp/includes
-mv $tmp/golang.org src
-
-mkinfo() {
-    ${MAKEINFO:=makeinfo} --plaintext \
-        --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
-        --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
-        -D "VERSION `cat VERSION`" $@
-}
-
-texi=$(mktemp)
-cat > $texi <<EOF
-\input texinfo
-@documentencoding UTF-8
-@settitle INSTALL
-@include install.texi
-@bye
-EOF
-perl -i -p -e "s/.verbatiminclude PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
-mkinfo --output INSTALL $texi
-rm $texi
-
-rm -rf .redo .git .gitignore style.css makedist.sh www.do module-name.do VERSION.do
-echo 'GOPATH=`pwd` ${GO:=go} build -o $3 `cat module-name`' > gocheese.do
-echo 'GOPATH=`pwd` ${GO:=go} test `cat module-name`/... >&2' > test.do
-cp ~/work/redo/minimal/do contrib/do
-
-find . -type d -exec chmod 755 {} \;
-find . -type f -exec chmod 644 {} \;
-chmod 755 contrib/pyshop2packages.sh contrib/do
-
-cd ..
-tar cvf gocheese-"$release".tar --uid=0 --gid=0 --numeric-owner gocheese-"$release"
-xz -9 gocheese-"$release".tar
-gpg --detach-sign --sign --local-user CD5CD01F55343D88 gocheese-"$release".tar.xz
-
-tarball=gocheese-"$release".tar.xz
-size=$(( $(stat -f %z $tarball) / 1024 ))
-hash=$(gpg --print-md SHA256 < $tarball)
-release_date=$(date "+%Y-%m-%d")
-
-cat <<EOF
-An entry for documentation:
-@item $release @tab $release_date @tab $size KiB
-@tab @url{gocheese-${release}.tar.xz, link} @url{gocheese-${release}.tar.xz.sig, sign}
-@tab @code{$hash}
-EOF
-
-mv $tmp/$tarball $tmp/"$tarball".sig $cur/gocheese.html/