scripts/mk-release.sh
author Peter Kovacs <kpeter@inf.elte.hu>
Sun, 09 Jan 2011 00:56:52 +0100
changeset 1202 ef200e268af2
parent 611 eda12d8ac953
permissions -rwxr-xr-x
Unifications and improvements in TSP algorithms (#386)
alpar@536
     1
#!/bin/bash
alpar@780
     2
#
alpar@780
     3
# This file is a part of LEMON, a generic C++ optimization library.
alpar@780
     4
#
alpar@780
     5
# Copyright (C) 2003-2009
alpar@780
     6
# Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@780
     7
# (Egervary Research Group on Combinatorial Optimization, EGRES).
alpar@780
     8
#
alpar@780
     9
# Permission to use, modify and distribute this software is granted
alpar@780
    10
# provided that this copyright notice appears in all copies. For
alpar@780
    11
# precise terms see the accompanying LICENSE file.
alpar@780
    12
#
alpar@780
    13
# This software is provided "AS IS" with no warranty of any kind,
alpar@780
    14
# express or implied, and with no claim as to its suitability for any
alpar@780
    15
# purpose.
alpar@536
    16
alpar@536
    17
set -e
alpar@536
    18
alpar@536
    19
if [ $# = 0 ]; then
alpar@536
    20
    echo "Usage: $0 release-id"
alpar@536
    21
    exit 1
alpar@536
    22
else
alpar@536
    23
    export LEMON_VERSION=$1
alpar@536
    24
fi
alpar@536
    25
alpar@536
    26
echo '*****************************************************************'
alpar@536
    27
echo ' Start making release tarballs for version '${LEMON_VERSION}
alpar@536
    28
echo '*****************************************************************'
alpar@536
    29
alpar@536
    30
autoreconf -vif
ladanyi@611
    31
./configure
alpar@536
    32
alpar@536
    33
make
alpar@536
    34
make html
alpar@536
    35
make distcheck
alpar@536
    36
tar xf lemon-${LEMON_VERSION}.tar.gz
alpar@536
    37
zip -r lemon-${LEMON_VERSION}.zip lemon-${LEMON_VERSION}
alpar@536
    38
mv lemon-${LEMON_VERSION}/doc/html lemon-doc-${LEMON_VERSION}
alpar@536
    39
tar czf lemon-doc-${LEMON_VERSION}.tar.gz lemon-doc-${LEMON_VERSION}
alpar@536
    40
zip -r lemon-doc-${LEMON_VERSION}.zip lemon-doc-${LEMON_VERSION}
alpar@536
    41
tar czf lemon-nodoc-${LEMON_VERSION}.tar.gz lemon-${LEMON_VERSION}
alpar@536
    42
zip -r lemon-nodoc-${LEMON_VERSION}.zip lemon-${LEMON_VERSION}
alpar@536
    43
hg tag -m 'LEMON '${LEMON_VERSION}' released ('$(hg par --template="{node|short}")' tagged as r'${LEMON_VERSION}')' r${LEMON_VERSION}
alpar@536
    44
alpar@536
    45
rm -rf lemon-${LEMON_VERSION} lemon-doc-${LEMON_VERSION}
alpar@536
    46
alpar@536
    47
echo '*****************************************************************'
alpar@536
    48
echo '  Release '${LEMON_VERSION}' has been created' 
alpar@536
    49
echo '*****************************************************************'