scripts/release
author alpar
Wed, 08 Nov 2006 23:40:08 +0000
changeset 2295 e464aaa8cdd7
parent 2241 37e0966e43b6
child 2567 62a9d46303d9
permissions -rwxr-xr-x
Send message to the commit author, as well
     1 #!/bin/bash
     2 
     3 # THE FIRST PARAMETER IS THE VERSION STRING
     4 
     5 if [ $# != 1 ]; then
     6     echo
     7     echo 'Usage: release version-string'
     8     echo 
     9     echo "WARNING: This script modifies the repository, so don't use it unless"
    10     echo '         you really want to make a release'
    11     exit 1
    12 fi
    13 
    14 set -e
    15 
    16 function make-dir () {
    17     if [ ! -d $1 ]; then
    18 	mkdir $1
    19     fi
    20 }
    21 
    22 VERSION=$1
    23 PKGNAME='lemon'
    24 VERSION_STRING='svnhead'
    25 
    26 make-dir release-dir
    27 cd release-dir
    28 
    29 echo
    30 echo '**********************************************************************'
    31 echo '   CHECK OUT'
    32 echo '**********************************************************************'
    33 echo
    34 
    35 rm -rf trunk
    36 svn co https://hugo.cs.elte.hu/svn/hugo/trunk
    37 # svn lock https://hugo.cs.elte.hu/svn/hugo/trunk
    38 
    39 cd trunk
    40 
    41 echo
    42 echo '**********************************************************************'
    43 echo "   CHANGE THE VERSION TO ${VERSION}"
    44 echo '**********************************************************************'
    45 echo
    46 
    47 sed "s/${VERSION_STRING}/${VERSION}/" <configure.ac >configure.ac.tmp
    48 mv configure.ac.tmp configure.ac
    49 
    50 echo
    51 echo '**********************************************************************'
    52 echo '   CREATE TARBALL'
    53 echo '**********************************************************************'
    54 echo
    55 
    56 #./bootstrap --amver=1.7
    57 autoreconf -vi
    58 ./configure CXXFLAGS='-g -O2 -W -Wall -Werror' --enable-gui --enable-demo --enable-benchmark
    59 make doc
    60 make distcheck 
    61 
    62 cd ..
    63 
    64 echo
    65 echo '**********************************************************************'
    66 echo '   CREATE THE OTHER TAR FILES'
    67 echo '**********************************************************************'
    68 echo
    69 
    70 mv trunk/${PKGNAME}-${VERSION}.tar.gz .
    71 tar xzf ${PKGNAME}-${VERSION}.tar.gz
    72 mv ${PKGNAME}-${VERSION}/doc/html ./${PKGNAME}-doc-${VERSION}
    73 tar czf ${PKGNAME}-doc-${VERSION}.tar.gz ${PKGNAME}-doc-${VERSION}
    74 tar czf ${PKGNAME}-${VERSION}-nodoc.tar.gz ${PKGNAME}-${VERSION}
    75 rm -rf ${PKGNAME}-${VERSION} ${PKGNAME}-doc-${VERSION}
    76 
    77 echo
    78 echo '**********************************************************************'
    79 echo '   CREATE SVN TAG'
    80 echo '**********************************************************************'
    81 echo
    82 
    83 svn cp trunk https://hugo.cs.elte.hu/svn/hugo/tags/${PKGNAME}-${VERSION} -m "Version ${VERSION} released."
    84 # svn unlock https://hugo.cs.elte.hu/svn/hugo/trunk