scripts/mk-release.sh
author Alpar Juttner <alpar@cs.elte.hu>
Tue, 31 Mar 2009 16:05:54 +0100
changeset 391 47b376a5a2a7
permissions -rwxr-xr-x
Small script making a release
alpar@391
     1
#!/bin/bash
alpar@391
     2
alpar@391
     3
set -e
alpar@391
     4
alpar@391
     5
if [ $# = 0 ]; then
alpar@391
     6
    echo "Usage: $0 release-id"
alpar@391
     7
    exit 1
alpar@391
     8
else
alpar@391
     9
    export LEMON_VERSION=$1
alpar@391
    10
fi
alpar@391
    11
alpar@391
    12
echo '*****************************************************************'
alpar@391
    13
echo ' Start making release tarballs for version '${LEMON_VERSION}
alpar@391
    14
echo '*****************************************************************'
alpar@391
    15
alpar@391
    16
autoreconf -vif
alpar@391
    17
./configure --enable-demo
alpar@391
    18
alpar@391
    19
make
alpar@391
    20
make html
alpar@391
    21
make distcheck
alpar@391
    22
tar xf lemon-${LEMON_VERSION}.tar.gz
alpar@391
    23
zip -r lemon-${LEMON_VERSION}.zip lemon-${LEMON_VERSION}
alpar@391
    24
mv lemon-${LEMON_VERSION}/doc/html lemon-doc-${LEMON_VERSION}
alpar@391
    25
tar czf lemon-doc-${LEMON_VERSION}.tar.gz lemon-doc-${LEMON_VERSION}
alpar@391
    26
zip -r lemon-doc-${LEMON_VERSION}.zip lemon-doc-${LEMON_VERSION}
alpar@391
    27
tar czf lemon-nodoc-${LEMON_VERSION}.tar.gz lemon-${LEMON_VERSION}
alpar@391
    28
zip -r lemon-nodoc-${LEMON_VERSION}.zip lemon-${LEMON_VERSION}
alpar@391
    29
hg tag -m 'LEMON '${LEMON_VERSION}' released ('$(hg par --template="{node|short}")' tagged as r'${LEMON_VERSION}')' r${LEMON_VERSION}
alpar@391
    30
alpar@391
    31
rm -rf lemon-${LEMON_VERSION} lemon-doc-${LEMON_VERSION}
alpar@391
    32
alpar@391
    33
echo '*****************************************************************'
alpar@391
    34
echo '  Release '${LEMON_VERSION}' has been created' 
alpar@391
    35
echo '*****************************************************************'