annotate contrib/make_flys_release/make_release.sh @ 8245:bb00ee1556b9

Patch build from given date not available anymore.
author Tom Gottfried <tom@intevation.de>
date Tue, 09 Sep 2014 14:53:12 +0200
parents 13c3d861db1d
children d4a2c7b83087
rev   line source
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
1 #!/bin/bash
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
2 # Release script for Flys
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
3 #
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
4 # Authors:
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
5 # Andre Heinecke <aheinecke@intevation.de>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
6 #
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
7 # Copyright:
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
8 # Copyright (C) 2013 Intevation GmbH
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
9 #
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
10 # This program is free software; you can redistribute it and/or
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
11 # modify it under the terms of the GNU General Public License
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
12 # as published by the Free Software Foundation; either version 2
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
13 # of the License, or (at your option) any later version.
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
14 #
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
15 # This program is distributed in the hope that it will be useful,
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
18 # GNU General Public License for more details.
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
19 #
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
20 # You should have received a copy of the GNU General Public License
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
21 # along with this program; if not, write to the Free Software
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
22 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23
5220
613d2f494728 Handle return codes in the make_flys_release script
Andre Heinecke <aheinecke@intevation.de>
parents: 5119
diff changeset
24 set -e
8080
13c3d861db1d Build is locale sensitive. Force a UTF-8 locale for building.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 7996
diff changeset
25 LC_ALL=en_US.UTF-8
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
26 DEFAULT_WD=/tmp/flys-release
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
27 DEVELOPER=aheinecke
5220
613d2f494728 Handle return codes in the make_flys_release script
Andre Heinecke <aheinecke@intevation.de>
parents: 5119
diff changeset
28
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
29 ARTIFACTS_HG_REPO="http://wald.intevation.org/hg/dive4elements/framework"
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
30 HTTPCLIIENT_HG_REPO="http://wald.intevation.org/hg/dive4elements/http-client"
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
31 FLYS_HG_REPO="http://wald.intevation.org/hg/dive4elements/river"
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
33 REPOS="river http-client framework"
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
34 # Do not use spaces in path
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
35 FLYS_SOURCE_DIR=/local-vol1/aheinecke/flys-release
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36
5320
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
37 ORACLE_HIBERNATE=$FLYS_SOURCE_DIR/hibernate-spatial-oracle-1.1.jar
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
38 ORACLE_JDBC=$FLYS_SOURCE_DIR/ojdbc5.jar
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
39
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
40 SCRIPT_DIR=$(readlink -f `dirname $0`)
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
41 usage(){
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
42 cat << EOF
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
44 usage: $0 [options] VERSION
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
45
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
46 Create a flys package
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
47
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
48 OPTIONS:
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
49 -?, --help Show this message
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
50 -w The working directory to use. (do not use spaces in path)
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
51 Default: $DEFAULT_WD
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
52 -t Tag the current default branch as "VERSION"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
53 -o, --oracle Release is for oracle.
5493
2be02d6ad9dc Allow default version in packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5418
diff changeset
54 VERSION must be in the format MAYOR.MINOR.PATCH or default
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
55 EOF
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
56 exit 0
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
57 }
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
58 # --backend-db-url Url of database backend. Default: $BACKENDURL
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
59 # --backend-db-pass Backend db password. Default: $BACKENDPASS
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
60 # --backend-db-port Backend db port. Default: $BACKENDPORT
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
61 # --backend-db-user Backend db user. Default: $BACKENDUSER
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
62 # --backend-db-backend Backend db backend name. Default: $BACKENDBACK
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
63 # --seddb-url Sediment db url. Default: $SEDDBURL
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
64 # --seddb-port Sediment db port. Default: $SEDDBPORT
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
65 # --seddb-user Sediment db user. Default: $SEDDBUSER
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
66 # --seddb-pass Sediment db password. Default: $SEDDBPASS
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
67 # --seddb-back Sediment db backend. Default: $SEDDBBACK
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
68 TOMCAT_PORT=${TOMCAT_PORT:-8282}
7949
0fa7db25fd67 Avoid having to set VERSION in external script.
Tom Gottfried <tom@intevation.de>
parents: 7948
diff changeset
69 MAPSERVER_URL=${MAPSERVER_URL:-http://flys-devel.intevation.de/cgi-bin/flys}
6224
8f129977e76e Default to a non internal wiki url
Andre Heinecke <aheinecke@intevation.de>
parents: 6164
diff changeset
70 WIKI_URL=${WIKI_URL:-https://flys3-devel.bafg.de/wiki}
5530
7f8d6b49afad Make FONT_PATH configurable in release script.
Andre Heinecke <aheinecke@intevation.de>
parents: 5493
diff changeset
71 # Prefix to FreeSans.ttf
7f8d6b49afad Make FONT_PATH configurable in release script.
Andre Heinecke <aheinecke@intevation.de>
parents: 5493
diff changeset
72 FONT_PATH=${FONT_PATH:-/opt/flys}
4494
334c68344eb5 Fix hard coded mapserver url
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4493
diff changeset
73
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
74 # Seddb Configuration
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
75 SEDDBURL=${SEDDBURL:-czech-republic.atlas.intevation.de}
6225
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
76 SEDDBPORT=${SEDDBPORT:-5432}
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
77 SEDDBBACK=${SEDDBBACK:-seddb}
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
78 SEDDBUSER=${SEDDBUSER:-flys}
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
79 SEDDBPASS=${SEDDBPASS:-flys}
5418
485ff339661e Add sedinitsqls to packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5383
diff changeset
80 SEDINITSQLS=${SEDINITSQLS:-}
485ff339661e Add sedinitsqls to packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5383
diff changeset
81
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
83 # Backend configuration
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
84 BACKENDURL=${BACKENDURL:-czech-republic.atlas.intevation.de}
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
85 BACKENDPORT=${BACKENDPORT:-5432}
5493
2be02d6ad9dc Allow default version in packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5418
diff changeset
86 BACKENDBACK=${BACKENDBACK:-flys_devel}
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
87 BACKENDUSER=${BACKENDUSER:-flys_dami}
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
88 BACKENDPASS=${BACKENDPASS:-flys_dami}
5255
f890d315240f Fix oracle backend configuration and allow INITSQLS statement
Andre Heinecke <aheinecke@intevation.de>
parents: 5254
diff changeset
89 INITSQLS=${INITSQLS:-}
7008
0e7c667018fc make_release.sh: default DGM_PATH to path on poland.
Tom Gottfried <tom@intevation.de>
parents: 6612
diff changeset
90 DGM_PATH=${DGM_PATH:-/vol1/projects/Geospatial/flys-3.0/testdaten/dami_dgms/}
5268
df7028d0cb93 Add LOG_DIR to make release to configure a logging directory. And
Andre Heinecke <aheinecke@intevation.de>
parents: 5255
diff changeset
91 LOG_DIR=/var/log/flys
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
92
7775
84889738d029 Defaulting to GGinA authentication in release script instead of client sources.
Tom Gottfried <tom@intevation.de>
parents: 7771
diff changeset
93 # Client configuration
84889738d029 Defaulting to GGinA authentication in release script instead of client sources.
Tom Gottfried <tom@intevation.de>
parents: 7771
diff changeset
94 AUTH=${AUTH:-GGinA}
7813
56870a7d9811 Replace model uuid of 'Beispielfluss' with model_uuid of 'Elbe'.
Raimund Renkert <rrenkert@intevation.de>
parents: 7804
diff changeset
95 ELBE_MODEL_UUID=${ELBE_MODEL_UUID:-1a4825f6-925f-11e3-8165-001f29e71d12}
7775
84889738d029 Defaulting to GGinA authentication in release script instead of client sources.
Tom Gottfried <tom@intevation.de>
parents: 7771
diff changeset
96
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
97 OPTS=`getopt -o ?w:,t,o \
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
98 -l help,oracle \
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
99 -n $0 -- "$@"`
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
100
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
101 if [ $? != 0 ] ; then usage; fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
102 eval set -- "$OPTS"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
103 while true ; do
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
104 case "$1" in
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
105 "-?"|"--help")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
106 usage;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
107 "--")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
108 shift
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
109 break;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
110 "-w")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
111 WORK_DIR=$2
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
112 shift 2;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
113 "-o"|"--oracle")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
114 BUILD_ORACLE="TRUE"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
115 shift;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
116 "-t")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
117 DO_TAG="TRUE"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
118 shift;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
119 *)
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
120 echo "Unknown Option $1"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
121 usage;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
122 esac
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
123 done
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
124
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
125 if [ $# != 1 ]; then
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
126 usage
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
127 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
128
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
129 VERSION=$1
7996
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
130 if [ -n "`hg branches | sed -n "/$VERSION/p"`" ]; then
5493
2be02d6ad9dc Allow default version in packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5418
diff changeset
131 ARTIFACT_PORT=${ARTIFACT_PORT:-29999}
2be02d6ad9dc Allow default version in packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5418
diff changeset
132 else
2be02d6ad9dc Allow default version in packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5418
diff changeset
133 ARTIFACT_PORT=${ARTIFACT_PORT:-`echo 1$VERSION | sed 's/\.//g'`}
2be02d6ad9dc Allow default version in packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5418
diff changeset
134 fi
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
135
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
136 if [ -z $WORK_DIR ]; then
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
137 WORK_DIR=$DEFAULT_WD
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
138 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
139
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
140 mkdir -p $WORK_DIR
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
141
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
142 if [ ! -d $FLYS_SOURCE_DIR ]; then
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
143 mkdir -p $FLYS_SOURCE_DIR
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
144 echo "Cloning sources"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
145 cd $FLYS_SOURCE_DIR
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
146 hg clone $ARTIFACTS_HG_REPO framework
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
147 hg clone $HTTPCLIIENT_HG_REPO http-client
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
148 hg clone $FLYS_HG_REPO river
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
149 else
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
150 echo "Updating sources / Reverting changes"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
151 cd $FLYS_SOURCE_DIR
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
152 for repo in $REPOS; do
5383
c841eac48474 First revert then update in the make release script to avoid conflicts
Andre Heinecke <aheinecke@intevation.de>
parents: 5325
diff changeset
153 cd $repo && hg pull && hg revert -a && hg up && cd $FLYS_SOURCE_DIR
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
154 done;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
155 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
156
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
157 if [ "$DO_TAG" = "TRUE" ]; then
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
158 echo "Tagging version $VERSION"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
159 for repo in $REPOS; do
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
160 cd $repo
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
161 CHANGESET=$(hg log -l1 |head -1 | awk -F: '{print $3}')
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
162 echo ""
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
163 echo "Do you really want to tag $repo rev: $CHANGESET as Version $VERSION?"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
164 echo "press enter to continue or CTRL+C to abort."
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
165 echo ""
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
166 hg log -l1
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
167 read
5320
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
168 OLD_REV=$(cat .hgtags | tail -1 | awk '{print $2}')
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
169 hg tag $VERSION -m "Added tag $VERSION for changeset $CHANGESET"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
170 hg push ssh://$DEVELOPER@scm.wald.intevation.org/hg/dive4elements/$repo
5320
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
171 echo "Changelog for $repo" >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
172 echo "#############################################################################" \
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
173 >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
174 hg log -r $VERSION:$OLD_REV --style changelog >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
175 cd $FLYS_SOURCE_DIR
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
176 done;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
177 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
178
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
179 # Update to current version
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
180 for repo in $REPOS; do
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
181 cd $repo
7996
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
182 if [ -z "`hg tags | sed -n "/$VERSION/p"`" -a -z "`hg branches | sed -n "/$VERSION/p"`" ]
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
183 then
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
184 echo "[WARNING]: $VERSION not found in $repo! Updating to default."
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
185 hg up default
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
186 else
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
187 hg up "$VERSION"
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
188 fi
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
189 cd $FLYS_SOURCE_DIR
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
190 done
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
191
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
192 rm -rf "$WORK_DIR/server" "$WORK_DIR/client"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
193 cd $WORK_DIR
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
194 mkdir -p "$WORK_DIR/server/bin/lib/own"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
195 mkdir "$WORK_DIR/server/shapefiles"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
196 mkdir "$WORK_DIR/client"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
197
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
198 echo "[INFO]: Preparing configuration of web client"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
199 echo "[INFO]: Tomcat Port: $TOMCAT_PORT"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
200 echo "[INFO]: Artifact Port: $ARTIFACT_PORT"
5692
d2c6d4ca6841 Add print url to relase script
Andre Heinecke <aheinecke@intevation.de>
parents: 5678
diff changeset
201
d2c6d4ca6841 Add print url to relase script
Andre Heinecke <aheinecke@intevation.de>
parents: 5678
diff changeset
202 #Needs to be done before the tomcat replacement below
7777
c7abf983d41b Set print URL to useful value for demo installation.
Tom Gottfried <tom@intevation.de>
parents: 7775
diff changeset
203 sed -i -e "s@http://localhost:8080/d4e/flys/mapfish-print@https://localhost/flys-${VERSION}/flys/mapfish-print@g" \
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
204 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/WEB-INF/web.xml
5692
d2c6d4ca6841 Add print url to relase script
Andre Heinecke <aheinecke@intevation.de>
parents: 5678
diff changeset
205
4503
f91260ccef03 Fixed typo in make_release script.
Raimund Renkert <rrenkert@intevation.de>
parents: 4494
diff changeset
206 sed -i -e "s@http://localhost:8181@http://localhost:$ARTIFACT_PORT@g" \
4487
a08d25476f0a Fixed web.xml seding
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4485
diff changeset
207 -e "s@http://localhost:8888@http://localhost:$TOMCAT_PORT@g" \
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
208 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/WEB-INF/web.xml
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
209
7775
84889738d029 Defaulting to GGinA authentication in release script instead of client sources.
Tom Gottfried <tom@intevation.de>
parents: 7771
diff changeset
210 sed -i -e "s@<param-value>plain</param-value>@<param-value>$AUTH</param-value>@" \
84889738d029 Defaulting to GGinA authentication in release script instead of client sources.
Tom Gottfried <tom@intevation.de>
parents: 7771
diff changeset
211 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/WEB-INF/web.xml
84889738d029 Defaulting to GGinA authentication in release script instead of client sources.
Tom Gottfried <tom@intevation.de>
parents: 7771
diff changeset
212
6419
47f4d2c1866a Add replacement rule for wiki url in make_release.sh
Christian Lins <christian.lins@intevation.de>
parents: 6225
diff changeset
213 sed -i -e "s@https://flys3-devel.bafg.de/wiki@${WIKI_URL}@g" \
6440
004b87755fa4 fix typo in make_release.sh
Tom Gottfried <tom@intevation.de>
parents: 6419
diff changeset
214 $FLYS_SOURCE_DIR/river/gwt-client/src/main/java/org/dive4elements/river/client/client/config.xml
6419
47f4d2c1866a Add replacement rule for wiki url in make_release.sh
Christian Lins <christian.lins@intevation.de>
parents: 6225
diff changeset
215
7782
507ce37ba6cd Set appropriate client log-file for demo installation.
Tom Gottfried <tom@intevation.de>
parents: 7780
diff changeset
216 sed -i -e "s@/var/log/d4e-river/d4e-client.log@${LOG_DIR}/client-${VERSION}.log@g" \
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
217 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/WEB-INF/log4j.properties
4493
b15f82f0d652 Fixed path to client logging
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4491
diff changeset
218
7813
56870a7d9811 Replace model uuid of 'Beispielfluss' with model_uuid of 'Elbe'.
Raimund Renkert <rrenkert@intevation.de>
parents: 7804
diff changeset
219 sed -i -e "s@1a4825f6-925f-11e3-8165-001f29e71d12@${ELBE_MODEL_UUID}@g" \
56870a7d9811 Replace model uuid of 'Beispielfluss' with model_uuid of 'Elbe'.
Raimund Renkert <rrenkert@intevation.de>
parents: 7804
diff changeset
220 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/images/FLYS_Karte_interactive.html
56870a7d9811 Replace model uuid of 'Beispielfluss' with model_uuid of 'Elbe'.
Raimund Renkert <rrenkert@intevation.de>
parents: 7804
diff changeset
221
6164
bfec80563325 Fix location of features.xml
Andre Heinecke <aheinecke@intevation.de>
parents: 6163
diff changeset
222 if [ -r "$FEATURES_XML" ]; then
bfec80563325 Fix location of features.xml
Andre Heinecke <aheinecke@intevation.de>
parents: 6163
diff changeset
223 cp "$FEATURES_XML" $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/WEB-INF/features.xml
bfec80563325 Fix location of features.xml
Andre Heinecke <aheinecke@intevation.de>
parents: 6163
diff changeset
224 fi
bfec80563325 Fix location of features.xml
Andre Heinecke <aheinecke@intevation.de>
parents: 6163
diff changeset
225
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
226 find $FLYS_SOURCE_DIR/river/ -name \*.properties -o -name \*.xsl | \
5325
53aee7e9ce53 Be more aggressive when replacing the wiki url
Andre Heinecke <aheinecke@intevation.de>
parents: 5320
diff changeset
227 xargs sed -i "s@https://flys-intern.intevation.de@${WIKI_URL}@g";
5119
15ff9ddc765e Patch WIKI urls during release building
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4889
diff changeset
228
7801
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
229 if [ -r "$WMSSERVICES_XML" ]; then
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
230 cp "$WMSSERVICES_XML" \
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
231 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/WEB-INF/wms-services.xml
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
232 fi
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
233
7778
35a7c05b5cd4 Remove FLYS-specific stuff from config.yaml and allow to give a custom file in release script.
Tom Gottfried <tom@intevation.de>
parents: 7777
diff changeset
234 if [ -r "$CONFIG_YAML" ]; then
35a7c05b5cd4 Remove FLYS-specific stuff from config.yaml and allow to give a custom file in release script.
Tom Gottfried <tom@intevation.de>
parents: 7777
diff changeset
235 cp "$CONFIG_YAML" $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/WEB-INF/config.yaml
35a7c05b5cd4 Remove FLYS-specific stuff from config.yaml and allow to give a custom file in release script.
Tom Gottfried <tom@intevation.de>
parents: 7777
diff changeset
236 fi
35a7c05b5cd4 Remove FLYS-specific stuff from config.yaml and allow to give a custom file in release script.
Tom Gottfried <tom@intevation.de>
parents: 7777
diff changeset
237
5678
57803a199856 Update Layout and add basic UTF-8 support that is still broken
Andre Heinecke <aheinecke@intevation.de>
parents: 5671
diff changeset
238 sed -i -e "s@/usr/share/fonts/truetype/freefont@${FONT_PATH}@g" \
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
239 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/WEB-INF/config.yaml
5678
57803a199856 Update Layout and add basic UTF-8 support that is still broken
Andre Heinecke <aheinecke@intevation.de>
parents: 5671
diff changeset
240
7780
9cce1b34e47b Remove FLYS-specific stuff from map configuration and allow to give a custom files in release script.
Tom Gottfried <tom@intevation.de>
parents: 7778
diff changeset
241 if [ -r "$RIVERMAP_XML" ]; then
9cce1b34e47b Remove FLYS-specific stuff from map configuration and allow to give a custom files in release script.
Tom Gottfried <tom@intevation.de>
parents: 7778
diff changeset
242 cp "$RIVERMAP_XML" $FLYS_SOURCE_DIR/river/artifacts/doc/conf/rivermap.xml
9cce1b34e47b Remove FLYS-specific stuff from map configuration and allow to give a custom files in release script.
Tom Gottfried <tom@intevation.de>
parents: 7778
diff changeset
243 fi
9cce1b34e47b Remove FLYS-specific stuff from map configuration and allow to give a custom files in release script.
Tom Gottfried <tom@intevation.de>
parents: 7778
diff changeset
244
9cce1b34e47b Remove FLYS-specific stuff from map configuration and allow to give a custom files in release script.
Tom Gottfried <tom@intevation.de>
parents: 7778
diff changeset
245 if [ -r "$FLOODMAP_XML" ]; then
9cce1b34e47b Remove FLYS-specific stuff from map configuration and allow to give a custom files in release script.
Tom Gottfried <tom@intevation.de>
parents: 7778
diff changeset
246 cp "$FLOODMAP_XML" $FLYS_SOURCE_DIR/river/artifacts/doc/conf/floodmap.xml
9cce1b34e47b Remove FLYS-specific stuff from map configuration and allow to give a custom files in release script.
Tom Gottfried <tom@intevation.de>
parents: 7778
diff changeset
247 fi
9cce1b34e47b Remove FLYS-specific stuff from map configuration and allow to give a custom files in release script.
Tom Gottfried <tom@intevation.de>
parents: 7778
diff changeset
248
7801
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
249 if [ -r "$METADATA_XML" ]; then
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
250 cp "$METADATA_XML" $FLYS_SOURCE_DIR/river/artifacts/doc/conf/meta-data.xml
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
251 fi
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
252
7804
5bb3f5d41d48 Add extra config files for modules and zoom scales and give option to use custom files for release.
Tom Gottfried <tom@intevation.de>
parents: 7801
diff changeset
253 if [ -r "$MODULES_XML" ]; then
5bb3f5d41d48 Add extra config files for modules and zoom scales and give option to use custom files for release.
Tom Gottfried <tom@intevation.de>
parents: 7801
diff changeset
254 cp "$MODULES_XML" $FLYS_SOURCE_DIR/river/artifacts/doc/conf/modules.xml
5bb3f5d41d48 Add extra config files for modules and zoom scales and give option to use custom files for release.
Tom Gottfried <tom@intevation.de>
parents: 7801
diff changeset
255 fi
5bb3f5d41d48 Add extra config files for modules and zoom scales and give option to use custom files for release.
Tom Gottfried <tom@intevation.de>
parents: 7801
diff changeset
256
5bb3f5d41d48 Add extra config files for modules and zoom scales and give option to use custom files for release.
Tom Gottfried <tom@intevation.de>
parents: 7801
diff changeset
257 if [ -r "$ZOOMSCALES_XML" ]; then
5bb3f5d41d48 Add extra config files for modules and zoom scales and give option to use custom files for release.
Tom Gottfried <tom@intevation.de>
parents: 7801
diff changeset
258 cp "$ZOOMSCALES_XML" $FLYS_SOURCE_DIR/river/artifacts/doc/conf/zoom-scales.xml
5bb3f5d41d48 Add extra config files for modules and zoom scales and give option to use custom files for release.
Tom Gottfried <tom@intevation.de>
parents: 7801
diff changeset
259 fi
5bb3f5d41d48 Add extra config files for modules and zoom scales and give option to use custom files for release.
Tom Gottfried <tom@intevation.de>
parents: 7801
diff changeset
260
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
261 if [ ! -f $FLYS_SOURCE_DIR/OpenLayers-2.11.tar.gz ]; then
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
262 echo "INFO: download OpenLayers-2.11 for client"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
263 cd $FLYS_SOURCE_DIR
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
264 curl -O http://openlayers.org/download/OpenLayers-2.11.tar.gz
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
265 tar xvfz OpenLayers-2.11.tar.gz
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
266 # TODO: Remove more superfluous OpenLayers stuff.
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
267 rm -rf OpenLayers-2.11/doc
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
268 rm -rf OpenLayers-2.11/tests
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
269 rm -rf OpenLayers-2.11/examples
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
270 cd $WORK_DIR
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
271 fi
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
272 cp -r $FLYS_SOURCE_DIR/OpenLayers-2.11 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
273
7939
6e852a6c72f2 Use SmartGWT version 4.1p. Updated release script to download SmartGWT.
Raimund Renkert <rrenkert@intevation.de>
parents: 7837
diff changeset
274 echo "INFO: Downloading smartGWT"
8245
bb00ee1556b9 Patch build from given date not available anymore.
Tom Gottfried <tom@intevation.de>
parents: 8080
diff changeset
275 mvn com.isomorphic:isc-maven-plugin:install -Dproduct=SMARTGWT -Dlicense=LGPL \
bb00ee1556b9 Patch build from given date not available anymore.
Tom Gottfried <tom@intevation.de>
parents: 8080
diff changeset
276 -DbuildNumber=4.1p -DbuildDate=2014-09-08 -Dworkdir=$WORK_DIR
7939
6e852a6c72f2 Use SmartGWT version 4.1p. Updated release script to download SmartGWT.
Raimund Renkert <rrenkert@intevation.de>
parents: 7837
diff changeset
277
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
278 echo "INFO: compile and build sources"
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
279 mvn -f $FLYS_SOURCE_DIR/framework/pom.xml clean compile package install
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
280 mvn -f $FLYS_SOURCE_DIR/river/backend/pom.xml clean compile package install
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
281 mvn -f $FLYS_SOURCE_DIR/river/artifacts/pom.xml clean compile package dependency:copy-dependencies install
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
282 mvn -f $FLYS_SOURCE_DIR/http-client/pom.xml clean compile package install
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
283 mvn -f $FLYS_SOURCE_DIR/river/gwt-client/pom.xml clean compile package
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
284
7951
092678a10379 This additional version of JFreeChart prevented diagrams to be drawn.
Tom Gottfried <tom@intevation.de>
parents: 7949
diff changeset
285 # remove unused Version of JFreeChart (it's a dependency of JasperReports
092678a10379 This additional version of JFreeChart prevented diagrams to be drawn.
Tom Gottfried <tom@intevation.de>
parents: 7949
diff changeset
286 # that prevents diagram generation in D4E river)
092678a10379 This additional version of JFreeChart prevented diagrams to be drawn.
Tom Gottfried <tom@intevation.de>
parents: 7949
diff changeset
287 rm $FLYS_SOURCE_DIR/river/artifacts/target/dependency/jfreechart-1.0.12.jar
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
288
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
289 echo "INFO: copy dependencies and libs"
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
290 cp $FLYS_SOURCE_DIR/framework/artifact-database/target/artifact-database-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
291 cp $FLYS_SOURCE_DIR/framework/artifacts/target/artifacts-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
292 cp $FLYS_SOURCE_DIR/framework/artifacts-common/target/artifacts-common-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
293 cp $FLYS_SOURCE_DIR/river/backend/target/river-backend-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
294 cp $FLYS_SOURCE_DIR/river/artifacts/target/river-artifacts-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
295 cp $FLYS_SOURCE_DIR/river/gwt-client/target/gwt-client-1.0-SNAPSHOT.war $WORK_DIR/client/flys-${VERSION}.war
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
296 cp $FLYS_SOURCE_DIR/river/artifacts/target/dependency/* $WORK_DIR/server/bin/lib/
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
297
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
298 echo "INFO: copy scripts and libraries to target destination"
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
299 cp ${SCRIPT_DIR}/bin/run.sh $WORK_DIR/server/bin/
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
300 cp ${SCRIPT_DIR}/libs/* $WORK_DIR/server/bin/lib/
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
301
7797
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
302 echo "INFO: download WSPLGEN"
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
303 wget https://wald.intevation.org/frs/download.php/1496/wsplgen-linux-64bit-static.gz
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
304 gunzip wsplgen-linux-64bit-static.gz
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
305 echo "16d60047aa114d69e9435dbbe56b6981b4e1c445 wsplgen-linux-64bit-static" | \
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
306 sha1sum -c
7816
286c09ff6fb8 Release script broke with r7814:242e790fb4ee.
Tom Gottfried <tom@intevation.de>
parents: 7813
diff changeset
307 mv wsplgen-linux-64bit-static $WORK_DIR/server/bin/wsplgen
286c09ff6fb8 Release script broke with r7814:242e790fb4ee.
Tom Gottfried <tom@intevation.de>
parents: 7813
diff changeset
308 chmod +x $WORK_DIR/server/bin/wsplgen
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
309
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
310 if [ "$BUILD_ORACLE" = "TRUE" ]; then
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
311 echo "INFO: remove PostgreSQL and PostGIS libraries"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
312 rm $WORK_DIR/server/bin/lib/postg*
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
313 rm $WORK_DIR/server/bin/lib/hibernate-spatial-postgis*
5320
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
314 if [ ! -f $ORACLE_JDBC ]; then
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
315 echo "Could not find oracle jdbc in $ORACLE_JDBC"
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
316 echo "Please make sure that the ORACLE_JDBC variable is set correctly"
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
317 exit 1
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
318 fi
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
319 if [ ! -f $ORACLE_HIBERNATE ]; then
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
320 echo "Could not find hibernate-spatial-oracle in $ORACLE_HIBERNATE"
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
321 echo "Please make sure that the ORACLE_HIBERNATE variable is set correctly"
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
322 exit 1
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
323 fi
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
324 cp $ORACLE_HIBERNATE $ORACLE_JDBC $WORK_DIR/server/bin/lib/
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
325 else
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
326 echo "INFO: remove Oralce libraries"
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
327 rm -f $WORK_DIR/server/bin/lib/hibernate-spatial-oracle-1.1.jar
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
328 rm -f $WORK_DIR/server/bin/lib/ojdbc*
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
329 fi
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
330
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
331 # fetch the configuration stuff
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
332 echo "INFO: copy default configuration to target destination"
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
333 cp -R $FLYS_SOURCE_DIR/river/artifacts/doc/conf $WORK_DIR/server/
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
334
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
335 sed -i "s/8181/$ARTIFACT_PORT/g" \
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
336 $WORK_DIR/server/conf/rest-server.xml
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
337
7949
0fa7db25fd67 Avoid having to set VERSION in external script.
Tom Gottfried <tom@intevation.de>
parents: 7948
diff changeset
338 sed -i -e "s@http://yourhost:8081/cgi-bin@${MAPSERVER_URL}-${VERSION}@g" \
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
339 $WORK_DIR/server/conf/floodmap.xml
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
340
7949
0fa7db25fd67 Avoid having to set VERSION in external script.
Tom Gottfried <tom@intevation.de>
parents: 7948
diff changeset
341 sed -i -e "s@http://yourhost:8081/cgi-bin@${MAPSERVER_URL}-${VERSION}@g" \
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
342 $WORK_DIR/server/conf/rivermap.xml
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
343
5530
7f8d6b49afad Make FONT_PATH configurable in release script.
Andre Heinecke <aheinecke@intevation.de>
parents: 5493
diff changeset
344 sed -i -e "s@/usr/share/fonts/truetype/freefont@${FONT_PATH}@g" \
7f8d6b49afad Make FONT_PATH configurable in release script.
Andre Heinecke <aheinecke@intevation.de>
parents: 5493
diff changeset
345 $WORK_DIR/server/conf/mapserver/fontset.txt
7f8d6b49afad Make FONT_PATH configurable in release script.
Andre Heinecke <aheinecke@intevation.de>
parents: 5493
diff changeset
346
5325
53aee7e9ce53 Be more aggressive when replacing the wiki url
Andre Heinecke <aheinecke@intevation.de>
parents: 5320
diff changeset
347 sed -i -e "s@/tmp/flys-rivers-wms.log@${LOG_DIR}/rivers-wms-${VERSION}.log@g" \
5268
df7028d0cb93 Add LOG_DIR to make release to configure a logging directory. And
Andre Heinecke <aheinecke@intevation.de>
parents: 5255
diff changeset
348 $WORK_DIR/server/conf/mapserver/river-mapfile.vm
df7028d0cb93 Add LOG_DIR to make release to configure a logging directory. And
Andre Heinecke <aheinecke@intevation.de>
parents: 5255
diff changeset
349
5325
53aee7e9ce53 Be more aggressive when replacing the wiki url
Andre Heinecke <aheinecke@intevation.de>
parents: 5320
diff changeset
350 sed -i -e "s@/tmp/flys-user-wms.log@${LOG_DIR}/user-wms-${VERSION}.log@g" \
5268
df7028d0cb93 Add LOG_DIR to make release to configure a logging directory. And
Andre Heinecke <aheinecke@intevation.de>
parents: 5255
diff changeset
351 $WORK_DIR/server/conf/mapserver/mapfile.vm
df7028d0cb93 Add LOG_DIR to make release to configure a logging directory. And
Andre Heinecke <aheinecke@intevation.de>
parents: 5255
diff changeset
352
7783
e55119cbdc19 Useful server-logging for demo installation.
Tom Gottfried <tom@intevation.de>
parents: 7782
diff changeset
353 sed -i -e "s@/var/log/d4e-river/d4e-server.log@${LOG_DIR}/server-${VERSION}.log@" \
e55119cbdc19 Useful server-logging for demo installation.
Tom Gottfried <tom@intevation.de>
parents: 7782
diff changeset
354 $WORK_DIR/server/conf/log4j.properties
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
355
5602
a586153a277a Add DGM_PATH variable
Andre Heinecke <aheinecke@intevation.de>
parents: 5530
diff changeset
356 sed -i -e "s@<dgm-path>/path/to/rivers/</dgm-path>@<dgm-path>${DGM_PATH}</dgm-path>@g" \
5705
00851caf6979 Replace example.com in conf.xml
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5692
diff changeset
357 -e "s@<help-url>http://example.com</help-url>@<help-url>${WIKI_URL}</help-url>@g" \
5602
a586153a277a Add DGM_PATH variable
Andre Heinecke <aheinecke@intevation.de>
parents: 5530
diff changeset
358 $WORK_DIR/server/conf/conf.xml
a586153a277a Add DGM_PATH variable
Andre Heinecke <aheinecke@intevation.de>
parents: 5530
diff changeset
359
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
360
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
361 if [ "$BUILD_ORACLE" = "TRUE" ]; then
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
362 # Oracle backend configuration
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
363 cat > $WORK_DIR/server/conf/backend-db.xml << EOF
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
364 <?xml version="1.0" encoding="UTF-8" ?>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
365 <backend-database>
5255
f890d315240f Fix oracle backend configuration and allow INITSQLS statement
Andre Heinecke <aheinecke@intevation.de>
parents: 5254
diff changeset
366 <user>$BACKENDUSER</user>
f890d315240f Fix oracle backend configuration and allow INITSQLS statement
Andre Heinecke <aheinecke@intevation.de>
parents: 5254
diff changeset
367 <password>$BACKENDPASS</password>
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
368 <dialect>org.hibernatespatial.oracle.OracleSpatial10gDialect</dialect>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
369 <driver>oracle.jdbc.driver.OracleDriver</driver>
5255
f890d315240f Fix oracle backend configuration and allow INITSQLS statement
Andre Heinecke <aheinecke@intevation.de>
parents: 5254
diff changeset
370 <url>jdbc:oracle:thin:@//$BACKENDURL:$BACKENDPORT/$BACKENDBACK</url>
f890d315240f Fix oracle backend configuration and allow INITSQLS statement
Andre Heinecke <aheinecke@intevation.de>
parents: 5254
diff changeset
371 <connection-init-sqls>$INITSQLS</connection-init-sqls>
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
372 </backend-database>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
373 EOF
6225
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
374
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
375 cat > $WORK_DIR/server/conf/seddb-db.xml << EOF
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
376 <?xml version="1.0" encoding="UTF-8" ?>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
377 <seddb-database>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
378 <user>$SEDDBUSER</user>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
379 <password>$SEDDBPASS</password>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
380 <dialect>org.hibernate.dialect.Oracle9iDialect</dialect>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
381 <driver>oracle.jdbc.driver.OracleDriver</driver>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
382 <url>jdbc:oracle:thin:@//$SEDDBURL:$SEDDBPORT/$SEDDBBACK</url>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
383 <connection-init-sqls>$SEDINITSQLS</connection-init-sqls>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
384 </seddb-database>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
385 EOF
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
386
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
387 else
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
388 #Postgresql backend configuration
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
389 cat > $WORK_DIR/server/conf/backend-db.xml << EOF
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
390 <?xml version="1.0" encoding="UTF-8" ?>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
391 <backend-database>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
392 <user>$BACKENDUSER</user>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
393 <password>$BACKENDPASS</password>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
394 <dialect>org.hibernate.dialect.PostgreSQLDialect</dialect>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
395 <driver>org.postgresql.Driver</driver>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
396 <url>jdbc:postgresql://$BACKENDURL:$BACKENDPORT/$BACKENDBACK</url>
5255
f890d315240f Fix oracle backend configuration and allow INITSQLS statement
Andre Heinecke <aheinecke@intevation.de>
parents: 5254
diff changeset
397 <connection-init-sqls>$INITSQLS</connection-init-sqls>
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
398 </backend-database>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
399 EOF
6225
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
400
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
401 cat > $WORK_DIR/server/conf/seddb-db.xml << EOF
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
402 <?xml version="1.0" encoding="UTF-8" ?>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
403 <seddb-database>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
404 <user>$SEDDBUSER</user>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
405 <password>$SEDDBPASS</password>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
406 <dialect>org.hibernate.dialect.PostgreSQLDialect</dialect>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
407 <driver>org.postgresql.Driver</driver>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
408 <url>jdbc:postgresql://$SEDDBURL:$SEDDBPORT/$SEDDBBACK</url>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
409 </seddb-database>
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
410 EOF
0aa9c5d8dccb Switch default seddb to postgres and handle the configuration
Andre Heinecke <aheinecke@intevation.de>
parents: 6224
diff changeset
411
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
412 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
413
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
414 mkdir $WORK_DIR/artifactsdb
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
415 mkdir $WORK_DIR/datacagedb
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
416
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
417 cp $FLYS_SOURCE_DIR/framework/artifact-database/doc/schema-h2.sql $WORK_DIR/artifactsdb/artifacts-h2.sql
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
418 cp $FLYS_SOURCE_DIR/river/artifacts/doc/conf/datacage.sql $WORK_DIR/datacagedb/datacage.sql
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
419
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
420 echo "INFO: create h2 database for artifacts and datacage"
7771
e2102c4b7b07 Change to work dir bevor creating artifacts and datacage db
Andre Heinecke <aheinecke@intevation.de>
parents: 7008
diff changeset
421 cd $WORK_DIR
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
422 $SCRIPT_DIR/h2/createArtifacts.sh $WORK_DIR/artifactsdb/artifacts-h2.sql
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
423 $SCRIPT_DIR/h2/createDatacage.sh $WORK_DIR/datacagedb/datacage.sql
7771
e2102c4b7b07 Change to work dir bevor creating artifacts and datacage db
Andre Heinecke <aheinecke@intevation.de>
parents: 7008
diff changeset
424 cd -
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
425
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
426 mv $WORK_DIR/artifactsdb $WORK_DIR/server/
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
427 mv $WORK_DIR/datacagedb $WORK_DIR/server/
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
428
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
429 echo "INFO: create tarball"
6612
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
430 if [ -d "$WORK_DIR/flys-$VERSION" ]; then
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
431 echo "INFO: removing old directory"
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
432 rm -rf "$WORK_DIR/flys-$VERSION"
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
433 fi
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
434
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
435 mkdir $WORK_DIR/flys-$VERSION
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
436 mv $WORK_DIR/server $WORK_DIR/client $WORK_DIR/flys-$VERSION
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
437 cd $WORK_DIR
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
438 tar cfz flys-$VERSION.tar.gz flys-$VERSION
7948
36f634917104 Override bad defaults of isc-maven-plugin. Please set DEFAULT_WD in make_release_sh to something individual if you are on a multi-user system.
Tom Gottfried <tom@intevation.de>
parents: 7946
diff changeset
439 #echo "INFO: cleanup"
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
440 #rm -r $WORK_DIR/flys-$VERSION
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
441
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
442 echo "DONE: $WORK_DIR/flys-$VERSION.tar.gz"
5320
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
443 echo "Changelog: $WORK_DIR/changes_$OLD_REV-$VERSION.txt"

http://dive4elements.wald.intevation.org