changeset 5320:a7778435a4af

Improve oracle integration and generate changelog when tagging
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 15 Mar 2013 11:04:13 +0100
parents 0324a5dfdfef
children 6dd354e7abfc
files contrib/make_flys_release/make_release.sh
diffstat 1 files changed, 22 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/make_flys_release/make_release.sh	Fri Mar 15 10:15:33 2013 +0100
+++ b/contrib/make_flys_release/make_release.sh	Fri Mar 15 11:04:13 2013 +0100
@@ -33,6 +33,9 @@
 # Do not use spaces in path
 FLYS_SOURCE_DIR=/local-vol1/aheinecke/flys-release
 
+ORACLE_HIBERNATE=$FLYS_SOURCE_DIR/hibernate-spatial-oracle-1.1.jar
+ORACLE_JDBC=$FLYS_SOURCE_DIR/ojdbc5.jar
+
 SCRIPT_DIR=$(readlink -f `dirname $0`)
 usage(){
     cat << EOF
@@ -62,7 +65,7 @@
 #   --seddb-pass                    Sediment db password. Default: $SEDDBPASS
 #   --seddb-back                    Sediment db backend. Default: $SEDDBBACK
 TOMCAT_PORT=${TOMCAT_PORT:-8282}
-MAPSERVER_URL=${MAPSERVER_URL:-czech-republic.atlas.intevation.de}
+MAPSERVER_URL=${MAPSERVER_URL:-flys-devel.intevation.de}
 WIKI_URL=${WIKI_URL:-https://flys-intern.intevation.de/Flys-3.0}
 
 # Seddb Configuration
@@ -75,7 +78,7 @@
 # Backend configuration
 BACKENDURL=${BACKENDURL:-czech-republic.atlas.intevation.de}
 BACKENDPORT=${BACKENDPORT:-5432}
-BACKENDBACK=${BACKENDBACK:-flys_2912}
+BACKENDBACK=${BACKENDBACK:-flys_2913}
 BACKENDUSER=${BACKENDUSER:-flys_dami}
 BACKENDPASS=${BACKENDPASS:-flys_dami}
 INITSQLS=${INITSQLS:-}
@@ -148,8 +151,13 @@
         echo ""
         hg log -l1
         read
+        OLD_REV=$(cat .hgtags | tail -1 | awk '{print $2}')
         hg tag $VERSION -m "Added tag $VERSION for changeset $CHANGESET"
         hg push ssh://$DEVELOPER@scm.wald.intevation.org/hg/dive4elements/$repo
+        echo "Changelog for $repo" >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt
+        echo "#############################################################################" \
+            >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt
+        hg log -r $VERSION:$OLD_REV --style changelog >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt
         cd $FLYS_SOURCE_DIR
     done;
 fi
@@ -220,6 +228,17 @@
     echo "INFO: remove PostgreSQL and PostGIS libraries"
     rm $WORK_DIR/server/bin/lib/postg*
     rm $WORK_DIR/server/bin/lib/hibernate-spatial-postgis*
+    if [ ! -f $ORACLE_JDBC ]; then
+        echo "Could not find oracle jdbc in $ORACLE_JDBC"
+        echo "Please make sure that the ORACLE_JDBC variable is set correctly"
+        exit 1
+    fi
+    if [ ! -f $ORACLE_HIBERNATE ]; then
+        echo "Could not find hibernate-spatial-oracle in $ORACLE_HIBERNATE"
+        echo "Please make sure that the ORACLE_HIBERNATE variable is set correctly"
+        exit 1
+    fi
+    cp $ORACLE_HIBERNATE $ORACLE_JDBC $WORK_DIR/server/bin/lib/
 else
     echo "INFO: remove Oralce libraries"
     rm -f $WORK_DIR/server/bin/lib/hibernate-spatial-oracle-1.1.jar
@@ -311,3 +330,4 @@
 #rm -r $WORK_DIR/flys-$VERSION
 
 echo "DONE: $WORK_DIR/flys-$VERSION.tar.gz"
+echo "Changelog: $WORK_DIR/changes_$OLD_REV-$VERSION.txt"

http://dive4elements.wald.intevation.org