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