Mercurial > dive4elements > river
annotate contrib/make_flys_release/make_release.sh @ 5261:1e403a0efc21
ImportRiver: Light cleaning up, waterlevelimport more parralel to other imports.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Wed, 13 Mar 2013 09:19:33 +0100 |
parents | f890d315240f |
children | df7028d0cb93 |
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 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
25 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
|
26 DEVELOPER=aheinecke |
5220
613d2f494728
Handle return codes in the make_flys_release script
Andre Heinecke <aheinecke@intevation.de>
parents:
5119
diff
changeset
|
27 |
4484
7e82d51c5a27
Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4151
diff
changeset
|
28 ARTIFACTS_HG_REPO="http://wald.intevation.org/hg/dive4elements/artifacts" |
7e82d51c5a27
Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4151
diff
changeset
|
29 HTTPCLIIENT_HG_REPO="http://wald.intevation.org/hg/dive4elements/http-client" |
7e82d51c5a27
Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4151
diff
changeset
|
30 FLYS_HG_REPO="http://wald.intevation.org/hg/dive4elements/flys" |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
32 REPOS="artifacts http-client flys" |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
33 # 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
|
34 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
|
35 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
36 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
|
37 usage(){ |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
38 cat << EOF |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
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 usage: $0 [options] VERSION |
4484
7e82d51c5a27
Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4151
diff
changeset
|
41 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
42 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
|
43 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
44 OPTIONS: |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
45 -?, --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
|
46 -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
|
47 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
|
48 -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
|
49 -o, --oracle Release is for oracle. |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
50 VERSION must be in the format MAYOR.MINOR.PATCH |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
51 EOF |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
52 exit 0 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
53 } |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
54 # --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
|
55 # --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
|
56 # --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
|
57 # --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
|
58 # --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
|
59 # --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
|
60 # --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
|
61 # --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
|
62 # --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
|
63 # --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
|
64 TOMCAT_PORT=${TOMCAT_PORT:-8282} |
4889
8118f9b0ee7b
Fixed config files.
Raimund Renkert <rrenkert@intevation.de>
parents:
4651
diff
changeset
|
65 MAPSERVER_URL=${MAPSERVER_URL:-czech-republic.atlas.intevation.de} |
5119
15ff9ddc765e
Patch WIKI urls during release building
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4889
diff
changeset
|
66 WIKI_URL=${WIKI_URL:-https://flys-intern.intevation.de/Flys-3.0} |
4494
334c68344eb5
Fix hard coded mapserver url
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4493
diff
changeset
|
67 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
68 # Seddb Configuration |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
69 SEDDBURL=${SEDDBURL:-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
|
70 SEDDBPORT=${SEDDBPORT:-1521} |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
71 SEDDBBACK=${SEDDBBACK:-XE} |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
72 SEDDBUSER=${SEDDBUSER:-seddb} |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
73 SEDDBPASS=${SEDDBPASS:-seddbpass} |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
75 # Backend configuration |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
76 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
|
77 BACKENDPORT=${BACKENDPORT:-5432} |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
78 BACKENDBACK=${BACKENDBACK:-flys_2912} |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
79 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
|
80 BACKENDPASS=${BACKENDPASS:-flys_dami} |
5255
f890d315240f
Fix oracle backend configuration and allow INITSQLS statement
Andre Heinecke <aheinecke@intevation.de>
parents:
5254
diff
changeset
|
81 INITSQLS=${INITSQLS:-} |
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 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
|
84 -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
|
85 -n $0 -- "$@"` |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
87 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
|
88 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
|
89 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
|
90 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
|
91 "-?"|"--help") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
92 usage;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
93 "--") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
94 shift |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
95 break;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
96 "-w") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
97 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
|
98 shift 2;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
99 "-o"|"--oracle") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
100 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
|
101 shift;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
102 "-t") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
103 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
|
104 shift;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
105 *) |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
106 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
|
107 usage;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
108 esac |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
109 done |
4484
7e82d51c5a27
Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4151
diff
changeset
|
110 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
111 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
|
112 usage |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
113 fi |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
114 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
115 VERSION=$1 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
116 ARTIFACT_PORT=${ARTIFACT_PORT:-`echo 1$VERSION | sed 's/\.//g'`} |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
117 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
118 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
|
119 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
|
120 fi |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
121 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
122 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
|
123 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
124 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
|
125 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
|
126 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
|
127 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
|
128 hg clone $ARTIFACTS_HG_REPO artifacts |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
129 hg clone $HTTPCLIIENT_HG_REPO http-client |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
130 hg clone $FLYS_HG_REPO flys |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
131 else |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
132 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
|
133 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
|
134 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
|
135 cd $repo && hg pull && hg up && hg revert -a && 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
|
136 done; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
137 fi |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
138 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
139 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
|
140 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
|
141 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
|
142 cd $repo |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
143 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
|
144 echo "" |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
145 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
|
146 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
|
147 echo "" |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
148 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
|
149 read |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
150 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
|
151 hg push ssh://$DEVELOPER@scm.wald.intevation.org/hg/dive4elements/$repo |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
152 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
|
153 done; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
154 fi |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
155 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
156 # 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
|
157 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
|
158 cd $repo |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
159 hg up $VERSION |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
160 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
|
161 done |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
162 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
163 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
|
164 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
|
165 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
|
166 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
|
167 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
|
168 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
169 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
|
170 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
|
171 echo "[INFO]: Artifact Port: $ARTIFACT_PORT" |
4503
f91260ccef03
Fixed typo in make_release script.
Raimund Renkert <rrenkert@intevation.de>
parents:
4494
diff
changeset
|
172 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
|
173 -e "s@http://localhost:8888@http://localhost:$TOMCAT_PORT@g" \ |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
174 $FLYS_SOURCE_DIR/flys/flys-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
|
175 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
176 sed -i -e "s@/tmp/flys-client.log@/var/log/flys/client-${VERSION}.log@g" \ |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
177 $FLYS_SOURCE_DIR/flys/flys-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
|
178 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
179 find $FLYS_SOURCE_DIR/flys/flys-artifacts/src/main/resources/ -name messages_\*.properties \ |
5254
a859691ec4a0
Fix wiki url injection
Andre Heinecke <aheinecke@intevation.de>
parents:
5251
diff
changeset
|
180 -exec sed -i "s@https://flys-intern.intevation.de/Flys-3.0@"'${WIKI_URL}'"@g" {} \; |
5119
15ff9ddc765e
Patch WIKI urls during release building
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4889
diff
changeset
|
181 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
182 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
|
183 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
|
184 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
|
185 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
|
186 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
|
187 # 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
|
188 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
|
189 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
|
190 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
|
191 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
|
192 fi |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
193 cp -r $FLYS_SOURCE_DIR/OpenLayers-2.11 $FLYS_SOURCE_DIR/flys/flys-client/src/main/webapp/ |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
194 |
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
195 echo "INFO: compile and build sources" |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
196 mvn -f $FLYS_SOURCE_DIR/artifacts/pom.xml clean compile package install |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
197 mvn -f $FLYS_SOURCE_DIR/flys/flys-backend/pom.xml clean compile package install |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
198 mvn -f $FLYS_SOURCE_DIR/flys/flys-artifacts/pom.xml clean compile package dependency:copy-dependencies install |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
199 mvn -f $FLYS_SOURCE_DIR/http-client/pom.xml clean compile package install |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
200 mvn -f $FLYS_SOURCE_DIR/flys/flys-client/pom.xml clean compile package |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
201 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
202 |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
203 echo "INFO: copy dependencies and libs" |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
204 cp $FLYS_SOURCE_DIR/artifacts/artifact-database/target/artifact-database-1.0-SNAPSHOT.jar $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
|
205 cp $FLYS_SOURCE_DIR/artifacts/artifacts/target/artifacts-1.0-SNAPSHOT.jar $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
|
206 cp $FLYS_SOURCE_DIR/artifacts/artifacts-common/target/artifacts-common-1.0-SNAPSHOT.jar $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
|
207 cp $FLYS_SOURCE_DIR/flys/flys-backend/target/flys-backend-1.0-SNAPSHOT.jar $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
|
208 cp $FLYS_SOURCE_DIR/flys/flys-artifacts/target/flys-artifacts-1.0-SNAPSHOT.jar $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
|
209 cp $FLYS_SOURCE_DIR/flys/flys-client/target/FLYS-1.0-SNAPSHOT.war $WORK_DIR/client/flys-${VERSION}.war |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
210 cp $FLYS_SOURCE_DIR/flys/flys-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
|
211 |
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
212 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
|
213 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
|
214 cp ${SCRIPT_DIR}/bin/wsplgen.exe $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
|
215 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
|
216 |
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
217 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
218 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
|
219 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
|
220 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
|
221 rm $WORK_DIR/server/bin/lib/hibernate-spatial-postgis* |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
222 else |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
223 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
|
224 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
|
225 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
|
226 fi |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
227 |
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
228 # fetch the configuration stuff |
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
229 echo "INFO: copy default configuration 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
|
230 cp -R $FLYS_SOURCE_DIR/flys/flys-artifacts/doc/conf $WORK_DIR/server/ |
4484
7e82d51c5a27
Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4151
diff
changeset
|
231 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
232 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
|
233 $WORK_DIR/server/conf/rest-server.xml |
4484
7e82d51c5a27
Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4151
diff
changeset
|
234 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
235 sed -i -e "s@http://example.com/@http://${MAPSERVER_URL}/@g" \ |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
236 $WORK_DIR/server/conf/floodmap.xml |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
237 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
238 sed -i -e "s@http://example.com/@http://${MAPSERVER_URL}/@g" \ |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
239 $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
|
240 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
241 sed "s@/tmp/flys-server-default.log@/var/log/flys/server-${VERSION}.log@" \ |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
242 $SCRIPT_DIR/confs/log4j.properties \ |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
243 > $WORK_DIR/server/conf/log4j.properties |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
244 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
245 cat > $WORK_DIR/server/conf/seddb-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
|
246 <?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
|
247 <seddb-database> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
248 <!-- This is the default SedDB db configuration. --> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
249 <user>$SEDDBUSER</user> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
250 <password>$SEDDBPASS</password> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
251 <dialect>org.hibernate.dialect.Oracle9iDialect</dialect> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
252 <driver>oracle.jdbc.driver.OracleDriver</driver> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
253 <url>jdbc:oracle:thin:@//$SEDDBURL:$SEDDBPORT/$SEDDBBACK </url> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
254 </seddb-database> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
255 EOF |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
256 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
257 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
|
258 # 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
|
259 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
|
260 <?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
|
261 <backend-database> |
5255
f890d315240f
Fix oracle backend configuration and allow INITSQLS statement
Andre Heinecke <aheinecke@intevation.de>
parents:
5254
diff
changeset
|
262 <user>$BACKENDUSER</user> |
f890d315240f
Fix oracle backend configuration and allow INITSQLS statement
Andre Heinecke <aheinecke@intevation.de>
parents:
5254
diff
changeset
|
263 <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
|
264 <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
|
265 <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
|
266 <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
|
267 <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
|
268 </backend-database> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
269 EOF |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
270 else |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
271 #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
|
272 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
|
273 <?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
|
274 <backend-database> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
275 <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
|
276 <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
|
277 <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
|
278 <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
|
279 <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
|
280 <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
|
281 </backend-database> |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
282 EOF |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
283 fi |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
284 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
285 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
|
286 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
|
287 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
288 cp $FLYS_SOURCE_DIR/artifacts/artifact-database/doc/schema-h2.sql $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
|
289 cp $FLYS_SOURCE_DIR/flys/flys-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
|
290 |
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
291 echo "INFO: create h2 database for artifacts and datacage" |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
292 $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
|
293 $SCRIPT_DIR/h2/createDatacage.sh $WORK_DIR/datacagedb/datacage.sql |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
294 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
295 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
|
296 mv $WORK_DIR/datacagedb $WORK_DIR/server/ |
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: create tarball" |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
299 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
|
300 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
|
301 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
|
302 tar cfz flys-$VERSION.tar.gz flys-$VERSION |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
303 echo "INFO: cleanup" |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
304 #rm -r $WORK_DIR/flys-$VERSION |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
305 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
306 echo "DONE: $WORK_DIR/flys-$VERSION.tar.gz" |