annotate contrib/make_flys_release/make_release.sh @ 5253:6064ab3984b3

Update documentation
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 12 Mar 2013 16:59:40 +0100
parents 8fa0c522bef3
children a859691ec4a0
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}
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
82 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
83 -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
84 -n $0 -- "$@"`
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
86 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
87 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
88 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
89 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
90 "-?"|"--help")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
91 usage;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
92 "--")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
93 shift
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
94 break;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
95 "-w")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
96 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
97 shift 2;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
98 "-o"|"--oracle")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
99 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
100 shift;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
101 "-t")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
102 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
103 shift;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
104 *)
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
105 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
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 esac
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
108 done
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
109
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
110 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
111 usage
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
112 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
113
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
114 VERSION=$1
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
115 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
116
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
117 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
118 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
119 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
120
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
121 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
122
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
123 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
124 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
125 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
126 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
127 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
128 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
129 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
130 else
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
131 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
132 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
133 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
134 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
135 done;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
136 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
137
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
138 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
139 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
140 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
141 cd $repo
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
142 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
143 echo ""
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
144 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
145 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
146 echo ""
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
147 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
148 read
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
149 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
150 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
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 done;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
153 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
154
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
155 # 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
156 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
157 cd $repo
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
158 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
159 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
160 done
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
161
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
162 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
163 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
164 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
165 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
166 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
167
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
168 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
169 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
170 echo "[INFO]: Artifact Port: $ARTIFACT_PORT"
4503
f91260ccef03 Fixed typo in make_release script.
Raimund Renkert <rrenkert@intevation.de>
parents: 4494
diff changeset
171 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
172 -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
173 $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
174
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
175 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
176 $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
177
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
178 find $FLYS_SOURCE_DIR/flys/flys-artifacts/src/main/resources/ -name messages_\*.properties \
5119
15ff9ddc765e Patch WIKI urls during release building
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4889
diff changeset
179 -exec sed -i "s@https://flys-intern.intevation.de/Flys-3.0@${WIKI_URL}@g" {} \;
15ff9ddc765e Patch WIKI urls during release building
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4889
diff changeset
180
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
181 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
182 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
183 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
184 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
185 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
186 # 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
187 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
188 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
189 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
190 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
191 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
192 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
193
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
194 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
195 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
196 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
197 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
198 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
199 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
200
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
201
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
202 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
203 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
204 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
205 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
206 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
207 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
208 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
209 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
210
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
211 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
212 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
213 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
214 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
215
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
216
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
217 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
218 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
219 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
220 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
221 else
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
222 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
223 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
224 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
225 fi
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
226
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
227 # fetch the configuration stuff
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
228 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
229 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
230
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
231 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
232 $WORK_DIR/server/conf/rest-server.xml
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
233
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
234 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
235 $WORK_DIR/server/conf/floodmap.xml
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
236
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
237 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
238 $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
239
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
240 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
241 $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
242 > $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
243
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
244 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
245 <?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
246 <seddb-database>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
247 <!-- 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
248 <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
249 <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
250 <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
251 <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
252 <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
253 </seddb-database>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
254 EOF
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
255
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
256 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
257 # 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
258 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
259 <?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
260 <backend-database>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
261 <user>flys27</user>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
262 <password>flys27</password>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
263 <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
264 <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
265 <url>jdbc:oracle:thin:@//czech-republic.atlas.intevation.de:1521/XE</url>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
266 </backend-database>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
267 EOF
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
268 else
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
269 #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
270 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
271 <?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
272 <backend-database>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
273 <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
274 <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
275 <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
276 <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
277 <url>jdbc:postgresql://$BACKENDURL:$BACKENDPORT/$BACKENDBACK</url>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
278 </backend-database>
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
279 EOF
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
280 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
281
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
282 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
283 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
284
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
285 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
286 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
287
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
288 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
289 $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
290 $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
291
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
292 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
293 mv $WORK_DIR/datacagedb $WORK_DIR/server/
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
294
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
295 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
296 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
297 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
298 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
299 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
300 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
301 #rm -r $WORK_DIR/flys-$VERSION
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
302
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
303 echo "DONE: $WORK_DIR/flys-$VERSION.tar.gz"

http://dive4elements.wald.intevation.org