[Lemon-commits] [lemon_svn] alpar: r2512 - hugo/trunk/scripts
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:53:11 CET 2006
Author: alpar
Date: Wed Feb 1 12:33:16 2006
New Revision: 2512
Added:
hugo/trunk/scripts/
hugo/trunk/scripts/DO-NOT-PLAY-WITH-release
hugo/trunk/scripts/check-compilers (contents, props changed)
hugo/trunk/scripts/check-tarball-integrity (contents, props changed)
hugo/trunk/scripts/make-snapshot (contents, props changed)
hugo/trunk/scripts/release (contents, props changed)
Log:
Some useful scripts:
check-compiler: test whether the repo compiles warningless
with various compilers.
check-integrity: checks whether everything is svn-added,
the makefiles are correct etc.
release: creates a version numbered release. Is modifies the repository.
DO NOT PLAY WITH IT!
Added: hugo/trunk/scripts/DO-NOT-PLAY-WITH-release
==============================================================================
--- (empty file)
+++ hugo/trunk/scripts/DO-NOT-PLAY-WITH-release Wed Feb 1 12:33:16 2006
@@ -0,0 +1 @@
+
Added: hugo/trunk/scripts/check-compilers
==============================================================================
--- (empty file)
+++ hugo/trunk/scripts/check-compilers Wed Feb 1 12:33:16 2006
@@ -0,0 +1,57 @@
+#!/bin/bash
+
+set -e
+
+function make-dir () {
+ if [ ! -d $1 ]; then
+ mkdir $1
+ fi
+}
+
+make-dir check-compilers-dir
+cd check-compilers-dir
+
+svn co https://hugo.cs.elte.hu/svn/hugo/trunk
+
+VERSION=r`svn info trunk|grep 'Revision:'|cut -d ' ' -f 2`
+NAME=lemon
+DISTNAME=${NAME}-$VERSION
+TARNAME=${DISTNAME}.tar.gz
+
+function makecheck () {
+ if [ `which $CXX` ]; then
+ make-dir $ODIR
+ cd $ODIR
+ time ../trunk/configure $*
+ time make check
+ cd ..
+ else
+ echo
+ echo '***************************************************************'
+ echo " COMPILER $CXX CANNOT BE FOUND"
+ echo '***************************************************************'
+ echo
+ fi
+}
+
+# CREATE TARBALL
+
+cd trunk
+./bootstrap --amver=1.7
+cd ..
+
+# CHECK COMPILERS
+
+ODIR=gcc-3.3 CXX=g++-3.3 CXXFLAGS='-W -Wall -Werror' makecheck --enable-gui --enable-demo --enable-benchmark
+
+ODIR=gcc-3.4 CXX=gcc-3.4 CXXFLAGS='-W -Wall -Werror' makecheck --enable-gui --enable-demo --enable-benchmark
+
+ODIR=gcc-4.0 CXX=g++-4.0 CXXFLAGS='-W -Wall -Werror' makecheck --enable-gui --enable-demo --enable-benchmark
+
+ODIR=icc-9.0 CXX=/opt/intel/cc/9.0/bin/icpc CXXFLAGS='-Werror' makecheck --enable-gui --enable-demo --enable-benchmark
+
+echo
+echo '**********************************************************************'
+echo ' REPOSITORY SEEMS OK'
+echo '**********************************************************************'
+echo
Added: hugo/trunk/scripts/check-tarball-integrity
==============================================================================
--- (empty file)
+++ hugo/trunk/scripts/check-tarball-integrity Wed Feb 1 12:33:16 2006
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+set -e
+
+function make-dir () {
+ if [ ! -d $1 ]; then
+ mkdir $1
+ fi
+}
+
+rm -rf check-tarball-integrity-dir
+make-dir check-tarball-integrity-dir
+cd check-tarball-integrity-dir
+
+svn co https://hugo.cs.elte.hu/svn/hugo/trunk
+
+VERSION=r`svn info trunk|grep 'Revision:'|cut -d ' ' -f 2`
+NAME=lemon
+DISTNAME=${NAME}-$VERSION
+TARNAME=${DISTNAME}.tar.gz
+
+function makecheck () {
+make-dir $ODIR
+cd $ODIR
+time ../$DISTNAME/configure $*
+time make check
+cd ..
+}
+
+# CREATE TARBALL
+
+cd trunk
+./bootstrap --amver=1.7
+./configure CXXFLAGS='-W -Wall -Werror' --enable-gui --enable-demo --enable-benchmark
+make doc
+make
+make VERSION=${VERSION} distcheck
+
+cd ..
+
+tar xf trunk/$TARNAME
+
+# CHECK COMPILERS
+
+ODIR=obj-dir CXXFLAGS='-W -Wall -Werror' makecheck --enable-gui --enable-demo --enable-benchmark
+
+echo
+echo '**********************************************************************'
+echo ' REPOSITORY SEEMS OK'
+echo '**********************************************************************'
+echo
Added: hugo/trunk/scripts/make-snapshot
==============================================================================
--- (empty file)
+++ hugo/trunk/scripts/make-snapshot Wed Feb 1 12:33:16 2006
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+make VERSION=r`svn info|grep 'Revision:'|cut -d ' ' -f 2` $*
Added: hugo/trunk/scripts/release
==============================================================================
--- (empty file)
+++ hugo/trunk/scripts/release Wed Feb 1 12:33:16 2006
@@ -0,0 +1,74 @@
+#!/bin/bash
+
+# THE FIRST PARAMETER IS THE VERSION STRING
+
+set -e
+
+function make-dir () {
+ if [ ! -d $1 ]; then
+ mkdir $1
+ fi
+}
+
+VERSION=$1
+PKGNAME=lemon
+VERSION_STRING=svn-head
+
+make-dir release-dir
+cd release-dir
+
+echo
+echo '**********************************************************************'
+echo ' CHECK OUT'
+echo '**********************************************************************'
+echo
+
+rm -rf trunk
+svn co https://hugo.cs.elte.hu/svn/hugo/trunk
+svn lock trunk
+
+cd trunk
+
+echo
+echo '**********************************************************************'
+echo " CHANGE THE VERSION TO ${VERSION}"
+echo '**********************************************************************'
+echo
+
+rpl ${VERSION_STRING} $VERSION configure.ac
+
+
+echo
+echo '**********************************************************************'
+echo ' CREATE TARBALL'
+echo '**********************************************************************'
+echo
+
+./bootstrap --amver-1.7
+./configure CXXFLAGS='-W -Wall -Werror' --enable-gui --enable-demo --enable-benchmark
+make doc
+make distcheck
+
+cd ..
+
+echo
+echo '**********************************************************************'
+echo ' CREATE THE OTHER TAR FILES'
+echo '**********************************************************************'
+echo
+
+mv trunk/${PKGNAME}-${VERSION}.tar.gz .
+tar xzf ${PKGNAME}-${VERSION}.tar.gz
+mv ${PKGNAME}-${VERSION}/doc/html ./${PKGNAME}-doc-${VERSION}
+tar czf ${PKGNAME}-doc-${VERSION}.tar.gz ${PKGNAME}-doc-${VERSION}
+tar czf ${PKGNAME}-${VERSION}-nodoc.tar.gz ${PKGNAME}-${VERSION}
+rm -rf ${PKGNAME}-${VERSION} ${PKGNAME}-doc-${VERSION}
+
+echo
+echo '**********************************************************************'
+echo ' CREATE SVN TAG'
+echo '**********************************************************************'
+echo
+
+svn cp trunk https://hugo.cs.elte.hu/svn/hugo/tags/${PKGNAME}-${VERSION} -m "Version ${VERSION} released."
+svn unlock trunk
More information about the Lemon-commits
mailing list