]> Cypherpunks.ru repositories - goredo.git/blob - makedist.sh
Up to date recfile
[goredo.git] / makedist.sh
1 #!/bin/sh -ex
2
3 cur=$(pwd)
4 tmp=$(mktemp -d)
5 release=$1
6 [ -n "$release" ]
7
8 git clone . $tmp/goredo-$release
9 cd $tmp/goredo-$release
10 git checkout v$release
11
12 redo-ifchange VERSION
13
14 ########################################################################
15 cd doc
16 cat > download.texi <<EOF
17 You can obtain releases source code prepared tarballs on
18 @url{http://www.goredo.cypherpunks.ru/}.
19 EOF
20
21 mkinfo() {
22     ${MAKEINFO:-makeinfo} --plaintext \
23         --set-customization-variable CLOSE_QUOTE_SYMBOL=\" \
24         --set-customization-variable OPEN_QUOTE_SYMBOL=\" \
25         -D "VERSION `cat ../VERSION`" $@
26 }
27
28 texi=$(mktemp)
29
30 cat > $texi <<EOF
31 \input texinfo
32 @documentencoding UTF-8
33 @settitle NEWS
34 @node News
35 @unnumbered News
36 `sed -n '3,$p' < news.texi`
37 @bye
38 EOF
39 mkinfo --output NEWS $texi
40
41 cat > $texi <<EOF
42 \input texinfo
43 @documentencoding UTF-8
44 @settitle INSTALL
45 @include install.texi
46 @bye
47 EOF
48 perl -i -p -e "s/.verbatiminclude .*PUBKEY.asc/Look in PUBKEY.asc file./" install.texi
49 mkinfo --output INSTALL $texi
50
51 cat > $texi <<EOF
52 \input texinfo
53 @documentencoding UTF-8
54 @settitle THANKS
55 `cat thanks.texi`
56 @bye
57 EOF
58 mkinfo --output THANKS $texi
59
60 rm $texi
61 redo goredo.info
62 mv goredo.info INSTALL NEWS THANKS ..
63 cd ..
64
65 ########################################################################
66
67 mkdir -p src
68 mv *.go go.* src
69 cd src
70 go mod vendor
71 modvendor -v -copy="**/*_test.go **/private-gen.go **/main.go **/vectors.json **/gen.go"
72 rm -rf vendor/golang.org/x/sys/plan9 vendor/golang.org/x/sys/windows
73 find vendor/golang.org/x/sys -name "*_test.go" -delete
74 find . \( -name .gitignore -o -name .travis.yml \) -delete
75 cd ..
76
77 ########################################################################
78
79 rm -rf *.texi .redo .git .gitignore doc makedist.sh VERSION.do
80 find . -type d -exec chmod 755 {} \;
81 find . -type f -exec chmod 644 {} \;
82 find t/redo-sh.tests -name test -exec chmod +x {} \+
83 find t -name wrapper.rc -exec chmod +x {} \+
84 chmod +x t/apenwarr/sleep t/goredo-*.t
85
86 cd ..
87 tar cvf goredo-"$release".tar --uid=0 --gid=0 --numeric-owner goredo-"$release"
88 zstd -19 -v goredo-"$release".tar
89 gpg --detach-sign --sign --local-user 3A528DDE952C7E93 goredo-"$release".tar.zst
90
91 tarball=goredo-"$release".tar.zst
92 size=$(( $(stat -f %z $tarball) / 1024 ))
93 hash=$(gpg --print-md SHA256 < $tarball)
94 release_date=$(date "+%Y-%m-%d")
95
96 cat <<EOF
97 An entry for documentation:
98 @item @ref{Release $release, $release} @tab $release_date @tab $size KiB
99 @tab @url{download/goredo-${release}.tar.zst, link} @url{download/goredo-${release}.tar.zst.sig, sign}
100 @tab @code{$hash}
101 EOF
102
103 mv $tmp/$tarball $tmp/"$tarball".sig $cur/doc/goredo.html/download
104
105 cat <<EOF
106 Subject: goredo $release release announcement
107
108 I am pleased to announce goredo $release release availability!
109
110 goredo is Go implementation of djb's redo,
111 Makefile replacement that sucks less.
112
113 ------------------------ >8 ------------------------
114
115 The main improvements for that release are:
116
117
118 ------------------------ >8 ------------------------
119
120 goredo's home page is: http://www.goredo.cypherpunks.ru/
121
122 Source code and its signature for that version can be found here:
123
124     http://www.goredo.cypherpunks.ru/download/goredo-${release}.tar.zst ($size KiB)
125     http://www.goredo.cypherpunks.ru/download/goredo-${release}.tar.zst.sig
126
127 SHA256 hash: $hash
128 GPG key ID: 0x3A528DDE952C7E93 goredo releases <goredo@cypherpunks.ru>
129 Fingerprint: 7531 BB84 FAF0 BF35 960C  63B9 3A52 8DDE 952C 7E93
130
131 Please send questions regarding the use of goredo, bug reports and patches
132 to mailing list: http://lists.cypherpunks.ru/goredo_002ddevel.html
133 EOF