1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
#!/bin/sh
# This encapsulates the way we release and how we set
# up tags marking a release.
# It uses configure and computes values we put
# in www.prevanders.net/dwarf.html
d=0.11.1chkres() {
r=$1
m=$2
if [ $r -ne 0 ]
then
echo "FAIL $m. Exit status $r"
exit 1
fi
}
bldloc=/tmp/bldrel
rm -rf $bldloc
mkdir $bldloc
chkres $? "mkdir failed"
cd $bldloc
chkres $? "cd failed"
~/dwarf/code/configure
chkres $? "configure failed"
make dist
chkres $? "make dist "
f=libdwarf-$d.tar.xz
echo "Release name: $f"
cp $f /home/davea/web4/gweb/pagedata/
chkres $? "cp to gweb failed"
cp $f /home/davea/Desktop/
chkres $? "cp to Desktop failed"
echo "Now size of release, bytes:"
ls -l $f
echo "Now md5sum:"
md5sum $f
chkres $? "md5sum failed"
echo "Now sha512sum:"
sha512sum $f| fold -w 32
chkres $? "sha512sum pipe failed"
# To get unforgeable checksums for the tar.gz file
# md5sum is weak, but the pair should be
# a strong confirmation.
# The fold(1) is just to make the web
# release page easier to work with.
echo "The release is $bldloc/libdwarf-$d.tar.xz"
date
echo "Do dwarf.html and doc/libdwarf.dox have latest?"
echo "Now do by hand:"
echo "git tag -a v$d -m Release=$d"
echo "git tag -a libdwarf-$d -m Release=$d"
echo "now push the tags:"
echo "git push origin libdwarf-$d"
echo "git push origin v$d"
echo "Then to verify tags match main:"
echo "git diff main v$d --name-status"
echo "git diff main libdwarf-$d --name-status"
echo "done makerelease.sh"
|