NEWS
[pyderasn.git] / makedist.sh
1 #!/bin/sh -ex
2
3 cur=$(pwd)
4 tmp=$(mktemp -d)
5 release=$1
6 [ -n "$release" ]
7
8 mkdir $tmp/pyderasn-"$release"
9 cut -d' ' -f2 < MANIFEST.in > $tmp/includes
10 echo pyderasn.py >> $tmp/includes
11 echo setup.py >> $tmp/includes
12 tar cfI - $tmp/includes | tar xfC - $tmp/pyderasn-"$release"
13
14 PYTHONPATH="$tmp/pyderasn-$release" make -C $tmp/pyderasn-"$release"/doc
15
16 tar xvfC doc/download/six-*.tar.xz $tmp --include '*/six.py'
17 mv -v $tmp/six-*/six.py $tmp/pyderasn-"$release"
18
19 cd $tmp
20 tar cvf pyderasn-"$release".tar pyderasn-"$release"
21 xz -9v pyderasn-"$release".tar
22 gpg --detach-sign --sign --local-user 04A933D1BA20327A pyderasn-"$release".tar.xz
23
24 tarball=pyderasn-"$release".tar.xz
25 size=$(( $(wc -c < $tarball) / 1024 ))
26 hash=$(gpg --print-md SHA256 < $tarball)
27
28 cat <<EOF
29 An entry for documentation:
30    * - \`\`pyderasn\`\` :ref:\`$release <release$release>\`
31      - $size KiB
32      - \`link <download/pyderasn-${release}.tar.xz>\`__
33        \`sign <download/pyderasn-${release}.tar.xz.sig>\`__
34      - \`\`$hash\`\`
35 EOF
36
37 mv $tmp/$tarball $tmp/"$tarball".sig $cur/doc/download