scripts/mk-release.sh
changeset 562 538b3dd9a2c0
child 564 eda12d8ac953
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/scripts/mk-release.sh	Tue Mar 31 16:25:10 2009 +0100
     1.3 @@ -0,0 +1,35 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +set -e
     1.7 +
     1.8 +if [ $# = 0 ]; then
     1.9 +    echo "Usage: $0 release-id"
    1.10 +    exit 1
    1.11 +else
    1.12 +    export LEMON_VERSION=$1
    1.13 +fi
    1.14 +
    1.15 +echo '*****************************************************************'
    1.16 +echo ' Start making release tarballs for version '${LEMON_VERSION}
    1.17 +echo '*****************************************************************'
    1.18 +
    1.19 +autoreconf -vif
    1.20 +./configure --enable-demo
    1.21 +
    1.22 +make
    1.23 +make html
    1.24 +make distcheck
    1.25 +tar xf lemon-${LEMON_VERSION}.tar.gz
    1.26 +zip -r lemon-${LEMON_VERSION}.zip lemon-${LEMON_VERSION}
    1.27 +mv lemon-${LEMON_VERSION}/doc/html lemon-doc-${LEMON_VERSION}
    1.28 +tar czf lemon-doc-${LEMON_VERSION}.tar.gz lemon-doc-${LEMON_VERSION}
    1.29 +zip -r lemon-doc-${LEMON_VERSION}.zip lemon-doc-${LEMON_VERSION}
    1.30 +tar czf lemon-nodoc-${LEMON_VERSION}.tar.gz lemon-${LEMON_VERSION}
    1.31 +zip -r lemon-nodoc-${LEMON_VERSION}.zip lemon-${LEMON_VERSION}
    1.32 +hg tag -m 'LEMON '${LEMON_VERSION}' released ('$(hg par --template="{node|short}")' tagged as r'${LEMON_VERSION}')' r${LEMON_VERSION}
    1.33 +
    1.34 +rm -rf lemon-${LEMON_VERSION} lemon-doc-${LEMON_VERSION}
    1.35 +
    1.36 +echo '*****************************************************************'
    1.37 +echo '  Release '${LEMON_VERSION}' has been created' 
    1.38 +echo '*****************************************************************'