Mercurial > dive4elements > river
comparison contrib/make_flys_release/make_release.sh @ 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 | df7028d0cb93 |
children | 53aee7e9ce53 |
comparison
equal
deleted
inserted
replaced
5319:0324a5dfdfef | 5320:a7778435a4af |
---|---|
30 FLYS_HG_REPO="http://wald.intevation.org/hg/dive4elements/flys" | 30 FLYS_HG_REPO="http://wald.intevation.org/hg/dive4elements/flys" |
31 | 31 |
32 REPOS="artifacts http-client flys" | 32 REPOS="artifacts http-client flys" |
33 # Do not use spaces in path | 33 # Do not use spaces in path |
34 FLYS_SOURCE_DIR=/local-vol1/aheinecke/flys-release | 34 FLYS_SOURCE_DIR=/local-vol1/aheinecke/flys-release |
35 | |
36 ORACLE_HIBERNATE=$FLYS_SOURCE_DIR/hibernate-spatial-oracle-1.1.jar | |
37 ORACLE_JDBC=$FLYS_SOURCE_DIR/ojdbc5.jar | |
35 | 38 |
36 SCRIPT_DIR=$(readlink -f `dirname $0`) | 39 SCRIPT_DIR=$(readlink -f `dirname $0`) |
37 usage(){ | 40 usage(){ |
38 cat << EOF | 41 cat << EOF |
39 | 42 |
60 # --seddb-port Sediment db port. Default: $SEDDBPORT | 63 # --seddb-port Sediment db port. Default: $SEDDBPORT |
61 # --seddb-user Sediment db user. Default: $SEDDBUSER | 64 # --seddb-user Sediment db user. Default: $SEDDBUSER |
62 # --seddb-pass Sediment db password. Default: $SEDDBPASS | 65 # --seddb-pass Sediment db password. Default: $SEDDBPASS |
63 # --seddb-back Sediment db backend. Default: $SEDDBBACK | 66 # --seddb-back Sediment db backend. Default: $SEDDBBACK |
64 TOMCAT_PORT=${TOMCAT_PORT:-8282} | 67 TOMCAT_PORT=${TOMCAT_PORT:-8282} |
65 MAPSERVER_URL=${MAPSERVER_URL:-czech-republic.atlas.intevation.de} | 68 MAPSERVER_URL=${MAPSERVER_URL:-flys-devel.intevation.de} |
66 WIKI_URL=${WIKI_URL:-https://flys-intern.intevation.de/Flys-3.0} | 69 WIKI_URL=${WIKI_URL:-https://flys-intern.intevation.de/Flys-3.0} |
67 | 70 |
68 # Seddb Configuration | 71 # Seddb Configuration |
69 SEDDBURL=${SEDDBURL:-czech-republic.atlas.intevation.de} | 72 SEDDBURL=${SEDDBURL:-czech-republic.atlas.intevation.de} |
70 SEDDBPORT=${SEDDBPORT:-1521} | 73 SEDDBPORT=${SEDDBPORT:-1521} |
73 SEDDBPASS=${SEDDBPASS:-seddbpass} | 76 SEDDBPASS=${SEDDBPASS:-seddbpass} |
74 | 77 |
75 # Backend configuration | 78 # Backend configuration |
76 BACKENDURL=${BACKENDURL:-czech-republic.atlas.intevation.de} | 79 BACKENDURL=${BACKENDURL:-czech-republic.atlas.intevation.de} |
77 BACKENDPORT=${BACKENDPORT:-5432} | 80 BACKENDPORT=${BACKENDPORT:-5432} |
78 BACKENDBACK=${BACKENDBACK:-flys_2912} | 81 BACKENDBACK=${BACKENDBACK:-flys_2913} |
79 BACKENDUSER=${BACKENDUSER:-flys_dami} | 82 BACKENDUSER=${BACKENDUSER:-flys_dami} |
80 BACKENDPASS=${BACKENDPASS:-flys_dami} | 83 BACKENDPASS=${BACKENDPASS:-flys_dami} |
81 INITSQLS=${INITSQLS:-} | 84 INITSQLS=${INITSQLS:-} |
82 LOG_DIR=/var/log/flys | 85 LOG_DIR=/var/log/flys |
83 | 86 |
146 echo "Do you really want to tag $repo rev: $CHANGESET as Version $VERSION?" | 149 echo "Do you really want to tag $repo rev: $CHANGESET as Version $VERSION?" |
147 echo "press enter to continue or CTRL+C to abort." | 150 echo "press enter to continue or CTRL+C to abort." |
148 echo "" | 151 echo "" |
149 hg log -l1 | 152 hg log -l1 |
150 read | 153 read |
154 OLD_REV=$(cat .hgtags | tail -1 | awk '{print $2}') | |
151 hg tag $VERSION -m "Added tag $VERSION for changeset $CHANGESET" | 155 hg tag $VERSION -m "Added tag $VERSION for changeset $CHANGESET" |
152 hg push ssh://$DEVELOPER@scm.wald.intevation.org/hg/dive4elements/$repo | 156 hg push ssh://$DEVELOPER@scm.wald.intevation.org/hg/dive4elements/$repo |
157 echo "Changelog for $repo" >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt | |
158 echo "#############################################################################" \ | |
159 >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt | |
160 hg log -r $VERSION:$OLD_REV --style changelog >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt | |
153 cd $FLYS_SOURCE_DIR | 161 cd $FLYS_SOURCE_DIR |
154 done; | 162 done; |
155 fi | 163 fi |
156 | 164 |
157 # Update to current version | 165 # Update to current version |
218 | 226 |
219 if [ "$BUILD_ORACLE" = "TRUE" ]; then | 227 if [ "$BUILD_ORACLE" = "TRUE" ]; then |
220 echo "INFO: remove PostgreSQL and PostGIS libraries" | 228 echo "INFO: remove PostgreSQL and PostGIS libraries" |
221 rm $WORK_DIR/server/bin/lib/postg* | 229 rm $WORK_DIR/server/bin/lib/postg* |
222 rm $WORK_DIR/server/bin/lib/hibernate-spatial-postgis* | 230 rm $WORK_DIR/server/bin/lib/hibernate-spatial-postgis* |
231 if [ ! -f $ORACLE_JDBC ]; then | |
232 echo "Could not find oracle jdbc in $ORACLE_JDBC" | |
233 echo "Please make sure that the ORACLE_JDBC variable is set correctly" | |
234 exit 1 | |
235 fi | |
236 if [ ! -f $ORACLE_HIBERNATE ]; then | |
237 echo "Could not find hibernate-spatial-oracle in $ORACLE_HIBERNATE" | |
238 echo "Please make sure that the ORACLE_HIBERNATE variable is set correctly" | |
239 exit 1 | |
240 fi | |
241 cp $ORACLE_HIBERNATE $ORACLE_JDBC $WORK_DIR/server/bin/lib/ | |
223 else | 242 else |
224 echo "INFO: remove Oralce libraries" | 243 echo "INFO: remove Oralce libraries" |
225 rm -f $WORK_DIR/server/bin/lib/hibernate-spatial-oracle-1.1.jar | 244 rm -f $WORK_DIR/server/bin/lib/hibernate-spatial-oracle-1.1.jar |
226 rm -f $WORK_DIR/server/bin/lib/ojdbc* | 245 rm -f $WORK_DIR/server/bin/lib/ojdbc* |
227 fi | 246 fi |
309 tar cfz flys-$VERSION.tar.gz flys-$VERSION | 328 tar cfz flys-$VERSION.tar.gz flys-$VERSION |
310 echo "INFO: cleanup" | 329 echo "INFO: cleanup" |
311 #rm -r $WORK_DIR/flys-$VERSION | 330 #rm -r $WORK_DIR/flys-$VERSION |
312 | 331 |
313 echo "DONE: $WORK_DIR/flys-$VERSION.tar.gz" | 332 echo "DONE: $WORK_DIR/flys-$VERSION.tar.gz" |
333 echo "Changelog: $WORK_DIR/changes_$OLD_REV-$VERSION.txt" |