cd $tmp/gocheese-$release
git checkout v$release
-mod_name=$(sed -n 's/^module //p' go.mod)
-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
+redo-ifchange VERSION
-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
+go mod vendor
-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
-
-cat > download.texi <<EOF
+cat > doc/download.texi <<EOF
You can obtain releases source code prepared tarballs on
@url{http://www.gocheese.cypherpunks.ru/}.
EOF
-make gocheese.info
+redo doc/gocheese.info
+
+cd doc
+mkinfo() {
+ ${MAKEINFO:=makeinfo} --plaintext \
+ --set-customization-variable SECTION_NAME_IN_TITLE=1 \
+ --set-customization-variable TREE_TRANSFORMATIONS=complete_tree_nodes_menus \
+ --set-customization-variable ASCII_PUNCTUATION=1 \
+ -D "VERSION `cat ../VERSION`" $@
+}
texi=$(mktemp)
cat > $texi <<EOF
@include install.texi
@bye
EOF
-perl -i -p -e "s/.verbatiminclude PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
-makeinfo --plaintext -o INSTALL $texi
+perl -i -p -e "s/.verbatiminclude ...PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
+mkinfo --output ../INSTALL $texi
rm $texi
+cd ..
-rm -rf .git .gitignore style.css makedist.sh www.mk
+rm -rf .git .gitignore doc/.gitignore doc/style.css makedist.sh doc/www.do VERSION.do
+redo-cleanup full
+perl -i -npe "s/go} build/go} build -mod=vendor/" gocheese.do
+perl -i -npe "s/go} test/go} test -mod=vendor/" test.do
+cp ~/work/redo/apenwarr/minimal/do contrib/do
-find . -type d -exec chmod 755 {} \;
-find . -type f -exec chmod 644 {} \;
-chmod +x pyshop2packages.sh
+find . -type d -exec chmod 755 {} +
+find . -type f -exec chmod 644 {} +
+chmod +x 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
+zstd -19 -v gocheese-"$release".tar
+tarball=gocheese-"$release".tar.zst
+gpg --detach-sign --sign --local-user CD5CD01F55343D88 $tarball
+gpg --enarmor < "$tarball".sig |
+ sed "/^Comment:/d ; s/ARMORED FILE/SIGNATURE/" > "$tarball".asc
+meta4-create -file "$tarball" -mtime "$tarball" -sig "$tarball".asc \
+ http://www.gocheese.cypherpunks.ru/download/"$tarball" \
+ http://y.www.gocheese.cypherpunks.ru/download/"$tarball" > "$tarball".meta4
-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
+ @url{download/gocheese-${release}.tar.zst.meta4, meta4}
+ @url{download/gocheese-${release}.tar.zst, link}
+ @url{download/gocheese-${release}.tar.zst.sig, sig}
@tab @code{$hash}
EOF
-mv $tmp/$tarball $tmp/"$tarball".sig $cur/gocheese.html/
+mv $tmp/$tarball $tmp/"$tarball".sig $tmp/"$tarball".meta4 $cur/doc/gocheese.html/download