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 64 65 66 67
|
#!/usr/bin/env bash
# This script assumes it's being run from the root of the SA code tree
set -x
umask 002
WEBDIR=$HOME/public_html
if [ ! -d $WEBDIR ] ; then
echo "WARNING: $WEBDIR does not exist" 1>&2
echo 1>&2
fi
RELDIR=$WEBDIR/devel
mkdir -p $RELDIR
DISTNAME=Mail-SpamAssassin
rm -rf $DISTNAME-* # otherwise make will fail
test -f Makefile && make distclean
perl Makefile.PL < /dev/null || exit $?
make version.env || exit $?
. version.env
# "3.1.0-pre2-r202405" should appear as "3.1.0-pre2" after this!
VERSION=`echo $FULL_VERSION | perl -pe 's/-r\d+$//'`
DISTDNAME=$DISTNAME-$DIST_VERSION
DISTVNAME=$DISTNAME-$VERSION
make || exit $?
make text_html_doc
make distcheck
echo $VERSION > $WEBDIR/latest_version
rm -f $DISTVNAME.*
make distdir || exit $?
tar -cvf $DISTVNAME.tar $DISTDNAME || exit $?
gzip -f9vc $DISTVNAME.tar > $DISTVNAME.tar.gz || exit $?
bzip2 -f9vc $DISTVNAME.tar > $DISTVNAME.tar.bz2 || exit $?
zip -rv - $DISTDNAME > $DISTVNAME.zip || exit $?
for ext in tar.bz2 tar.gz zip ; do
cp $DISTVNAME.$ext $RELDIR
perl build/sha256sum.pl $DISTVNAME.$ext > $RELDIR/$DISTVNAME.$ext.sha256 || exit $?
perl build/sha512sum.pl $DISTVNAME.$ext > $RELDIR/$DISTVNAME.$ext.sha512 || exit $?
rm -f $DISTVNAME.$ext.asc*
if [ -d $HOME/sabuildtools/sasigningkey ]; then
gpg --homedir $HOME/sabuildtools/sasigningkey --detach-sign --armor $DISTVNAME.$ext || exit $?
mv $DISTVNAME.$ext.asc $RELDIR/$DISTVNAME.$ext.asc || exit $?
fi
rm -f $DISTVNAME.$ext
done
test -f Makefile && make distclean
rm -f $DISTVNAME.*
ls -l $RELDIR
|