annotate contrib/make_flys_release/make_release.sh @ 8506:da9365fc2f42

(issue1777) Evaluate CLIENT_CONF environment variable
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 16 Dec 2014 14:27:13 +0100
parents c8d633c0971b
children 522c46c53861
rev   line source
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
1 #!/bin/bash
8493
07a369e6e277 Correct header for release script.
Tom Gottfried <tom@intevation.de>
parents: 8485
diff changeset
2 # Release script for Dive4Elements River
5251
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 #
8493
07a369e6e277 Correct header for release script.
Tom Gottfried <tom@intevation.de>
parents: 8485
diff changeset
7 # Copyright (C) 2011 - 2014 by Bundesanstalt für Gewässerkunde
07a369e6e277 Correct header for release script.
Tom Gottfried <tom@intevation.de>
parents: 8485
diff changeset
8 # Software engineering by Intevation GmbH
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
9 #
8493
07a369e6e277 Correct header for release script.
Tom Gottfried <tom@intevation.de>
parents: 8485
diff changeset
10 # This file is Free Software under the GNU AGPL (>=v3)
07a369e6e277 Correct header for release script.
Tom Gottfried <tom@intevation.de>
parents: 8485
diff changeset
11 # and comes with ABSOLUTELY NO WARRANTY! Check out the
07a369e6e277 Correct header for release script.
Tom Gottfried <tom@intevation.de>
parents: 8485
diff changeset
12 # documentation coming with Dive4Elements River for details.
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
5220
613d2f494728 Handle return codes in the make_flys_release script
Andre Heinecke <aheinecke@intevation.de>
parents: 5119
diff changeset
14 set -e
8080
13c3d861db1d Build is locale sensitive. Force a UTF-8 locale for building.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 7996
diff changeset
15 LC_ALL=en_US.UTF-8
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
16 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
17 DEVELOPER=aheinecke
5220
613d2f494728 Handle return codes in the make_flys_release script
Andre Heinecke <aheinecke@intevation.de>
parents: 5119
diff changeset
18
8499
5096b4ed230d Release script: use trusted connections to repositories.
Tom Gottfried <tom@intevation.de>
parents: 8495
diff changeset
19 ARTIFACTS_HG_REPO="https://wald.intevation.org/hg/dive4elements/framework"
5096b4ed230d Release script: use trusted connections to repositories.
Tom Gottfried <tom@intevation.de>
parents: 8495
diff changeset
20 HTTPCLIIENT_HG_REPO="https://wald.intevation.org/hg/dive4elements/http-client"
5096b4ed230d Release script: use trusted connections to repositories.
Tom Gottfried <tom@intevation.de>
parents: 8495
diff changeset
21 FLYS_HG_REPO="https://wald.intevation.org/hg/dive4elements/river"
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
23 REPOS="river http-client framework"
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
24 # 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
25 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
26
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
27 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
28 usage(){
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
29 cat << EOF
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
31 usage: $0 [options] VERSION
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
32
8501
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
33 Create a D4E River package
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
34
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
35 OPTIONS:
8494
76994a0187fa Do not give Oracle-JARs with hardcoded personal path in release script.
Tom Gottfried <tom@intevation.de>
parents: 8493
diff changeset
36 -?, --help Show this message
76994a0187fa Do not give Oracle-JARs with hardcoded personal path in release script.
Tom Gottfried <tom@intevation.de>
parents: 8493
diff changeset
37 -w The working directory to use (do not use spaces in path)
76994a0187fa Do not give Oracle-JARs with hardcoded personal path in release script.
Tom Gottfried <tom@intevation.de>
parents: 8493
diff changeset
38 Default: $DEFAULT_WD
76994a0187fa Do not give Oracle-JARs with hardcoded personal path in release script.
Tom Gottfried <tom@intevation.de>
parents: 8493
diff changeset
39 -t Tag the current default branch as "VERSION"
76994a0187fa Do not give Oracle-JARs with hardcoded personal path in release script.
Tom Gottfried <tom@intevation.de>
parents: 8493
diff changeset
40 -o, --oracle Release is for oracle.
76994a0187fa Do not give Oracle-JARs with hardcoded personal path in release script.
Tom Gottfried <tom@intevation.de>
parents: 8493
diff changeset
41 Suitable jar-files for JDBC driver and
76994a0187fa Do not give Oracle-JARs with hardcoded personal path in release script.
Tom Gottfried <tom@intevation.de>
parents: 8493
diff changeset
42 hibernate-spatial have to be given with the
76994a0187fa Do not give Oracle-JARs with hardcoded personal path in release script.
Tom Gottfried <tom@intevation.de>
parents: 8493
diff changeset
43 environment variables ORACLE_JDBC and ORACLE_HIBERNATE
5493
2be02d6ad9dc Allow default version in packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5418
diff changeset
44 VERSION must be in the format MAYOR.MINOR.PATCH or default
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
45 EOF
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
46 exit 0
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
47 }
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
48 # --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
49 # --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
50 # --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
51 # --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
52 # --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
53 # --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
54 # --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
55 # --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
56 # --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
57 # --seddb-back Sediment db backend. Default: $SEDDBBACK
4494
334c68344eb5 Fix hard coded mapserver url
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4493
diff changeset
58
8501
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
59 # customizable variables
7813
56870a7d9811 Replace model uuid of 'Beispielfluss' with model_uuid of 'Elbe'.
Raimund Renkert <rrenkert@intevation.de>
parents: 7804
diff changeset
60 ELBE_MODEL_UUID=${ELBE_MODEL_UUID:-1a4825f6-925f-11e3-8165-001f29e71d12}
7775
84889738d029 Defaulting to GGinA authentication in release script instead of client sources.
Tom Gottfried <tom@intevation.de>
parents: 7771
diff changeset
61
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
62 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
63 -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
64 -n $0 -- "$@"`
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
66 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
67 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
68 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
69 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
70 "-?"|"--help")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
71 usage;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
72 "--")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
73 shift
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
74 break;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
75 "-w")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
76 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
77 shift 2;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
78 "-o"|"--oracle")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
79 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
80 shift;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
81 "-t")
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
82 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
83 shift;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
84 *)
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
85 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
86 usage;;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
87 esac
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
88 done
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
89
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
90 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
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 fi
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 VERSION=$1
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
95
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
96 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
97 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
98 fi
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
99
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
100 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
101
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
102 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
103 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
104 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
105 cd $FLYS_SOURCE_DIR
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
106 hg clone $ARTIFACTS_HG_REPO framework
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
107 hg clone $HTTPCLIIENT_HG_REPO http-client
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
108 hg clone $FLYS_HG_REPO river
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
109 else
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
110 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
111 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
112 for repo in $REPOS; do
5383
c841eac48474 First revert then update in the make release script to avoid conflicts
Andre Heinecke <aheinecke@intevation.de>
parents: 5325
diff changeset
113 cd $repo && hg pull && hg revert -a && hg up && cd $FLYS_SOURCE_DIR
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
114 done;
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
115 fi
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 [ "$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
118 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
119 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
120 cd $repo
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
121 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
122 echo ""
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
123 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
124 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
125 echo ""
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
126 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
127 read
5320
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
128 OLD_REV=$(cat .hgtags | tail -1 | awk '{print $2}')
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
129 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
130 hg push ssh://$DEVELOPER@scm.wald.intevation.org/hg/dive4elements/$repo
5320
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
131 echo "Changelog for $repo" >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
132 echo "#############################################################################" \
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
133 >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
134 hg log -r $VERSION:$OLD_REV --style changelog >> $WORK_DIR/changes_$OLD_REV-$VERSION.txt
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
135 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 # 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
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
7996
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
142 if [ -z "`hg tags | sed -n "/$VERSION/p"`" -a -z "`hg branches | sed -n "/$VERSION/p"`" ]
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
143 then
8501
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
144 echo "WARNING: $VERSION not found in $repo! Updating to default."
7996
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
145 hg up default
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
146 else
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
147 hg up "$VERSION"
c4bf75f82ffc Allow building Release from specific branch. Beware that branches to not get different ports automatically.
Tom Gottfried <tom@intevation.de>
parents: 7951
diff changeset
148 fi
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
149 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
150 done
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
151
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
152 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
153 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
154 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
155 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
156 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
157
8501
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
158
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
159 echo "INFO: Preparing configuration of web client"
5692
d2c6d4ca6841 Add print url to relase script
Andre Heinecke <aheinecke@intevation.de>
parents: 5678
diff changeset
160
d2c6d4ca6841 Add print url to relase script
Andre Heinecke <aheinecke@intevation.de>
parents: 5678
diff changeset
161 #Needs to be done before the tomcat replacement below
7813
56870a7d9811 Replace model uuid of 'Beispielfluss' with model_uuid of 'Elbe'.
Raimund Renkert <rrenkert@intevation.de>
parents: 7804
diff changeset
162 sed -i -e "s@1a4825f6-925f-11e3-8165-001f29e71d12@${ELBE_MODEL_UUID}@g" \
56870a7d9811 Replace model uuid of 'Beispielfluss' with model_uuid of 'Elbe'.
Raimund Renkert <rrenkert@intevation.de>
parents: 7804
diff changeset
163 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/images/FLYS_Karte_interactive.html
56870a7d9811 Replace model uuid of 'Beispielfluss' with model_uuid of 'Elbe'.
Raimund Renkert <rrenkert@intevation.de>
parents: 7804
diff changeset
164
8501
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
165 if [ -d $WEBINF ]; then
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
166 echo "INFO: copy custom client configuration to target destination"
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
167 WEBINF_DIR=$FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/WEB-INF/
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
168 cp -R $WEBINF/* $WEBINF_DIR
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
169 for file in `find $WEBINF_DIR/ -type f`; do
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
170 sed -i -e "s@D4E_VERSION@${VERSION}@g" $file
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
171 done
7801
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
172 fi
1431d1af84d7 Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents: 7797
diff changeset
173
8506
da9365fc2f42 (issue1777) Evaluate CLIENT_CONF environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8501
diff changeset
174 if [ -f $CLIENT_CONF ]; then
da9365fc2f42 (issue1777) Evaluate CLIENT_CONF environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8501
diff changeset
175 echo "INFO: copy custom java script client configuration to target destination"
da9365fc2f42 (issue1777) Evaluate CLIENT_CONF environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8501
diff changeset
176 cp $CLIENT_CONF \
da9365fc2f42 (issue1777) Evaluate CLIENT_CONF environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8501
diff changeset
177 $FLYS_SOURCE_DIR/river/gwt-client/src/main/java/org/dive4elements/river/client/client/config.xml
da9365fc2f42 (issue1777) Evaluate CLIENT_CONF environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents: 8501
diff changeset
178 fi
8384
d4a2c7b83087 Add possibility to give custom config for server log.
Tom Gottfried <tom@intevation.de>
parents: 8245
diff changeset
179
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
180 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
181 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
182 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
183 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
184 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
185 # 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
186 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
187 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
188 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
189 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
190 fi
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
191 cp -r $FLYS_SOURCE_DIR/OpenLayers-2.11 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
192
7939
6e852a6c72f2 Use SmartGWT version 4.1p. Updated release script to download SmartGWT.
Raimund Renkert <rrenkert@intevation.de>
parents: 7837
diff changeset
193 echo "INFO: Downloading smartGWT"
8245
bb00ee1556b9 Patch build from given date not available anymore.
Tom Gottfried <tom@intevation.de>
parents: 8080
diff changeset
194 mvn com.isomorphic:isc-maven-plugin:install -Dproduct=SMARTGWT -Dlicense=LGPL \
8500
414e68e6d19a The used patch build of SmartGWT is not available anymore.
Tom Gottfried <tom@intevation.de>
parents: 8499
diff changeset
195 -DbuildNumber=4.1p -DbuildDate=2014-12-13 -Dworkdir=$WORK_DIR
7939
6e852a6c72f2 Use SmartGWT version 4.1p. Updated release script to download SmartGWT.
Raimund Renkert <rrenkert@intevation.de>
parents: 7837
diff changeset
196
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
197 echo "INFO: compile and build sources"
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
198 mvn -f $FLYS_SOURCE_DIR/framework/pom.xml clean compile package install
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
199 mvn -f $FLYS_SOURCE_DIR/river/backend/pom.xml clean compile package install
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
200 mvn -f $FLYS_SOURCE_DIR/river/artifacts/pom.xml clean compile package dependency:copy-dependencies install
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
201 mvn -f $FLYS_SOURCE_DIR/http-client/pom.xml clean compile package install
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
202 mvn -f $FLYS_SOURCE_DIR/river/gwt-client/pom.xml clean compile package
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
203
7951
092678a10379 This additional version of JFreeChart prevented diagrams to be drawn.
Tom Gottfried <tom@intevation.de>
parents: 7949
diff changeset
204 # remove unused Version of JFreeChart (it's a dependency of JasperReports
092678a10379 This additional version of JFreeChart prevented diagrams to be drawn.
Tom Gottfried <tom@intevation.de>
parents: 7949
diff changeset
205 # that prevents diagram generation in D4E river)
092678a10379 This additional version of JFreeChart prevented diagrams to be drawn.
Tom Gottfried <tom@intevation.de>
parents: 7949
diff changeset
206 rm $FLYS_SOURCE_DIR/river/artifacts/target/dependency/jfreechart-1.0.12.jar
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
207
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
208 echo "INFO: copy dependencies and libs"
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
209 cp $FLYS_SOURCE_DIR/framework/artifact-database/target/artifact-database-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
210 cp $FLYS_SOURCE_DIR/framework/artifacts/target/artifacts-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
211 cp $FLYS_SOURCE_DIR/framework/artifacts-common/target/artifacts-common-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
212 cp $FLYS_SOURCE_DIR/river/backend/target/river-backend-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
213 cp $FLYS_SOURCE_DIR/river/artifacts/target/river-artifacts-1.0-SNAPSHOT.jar $WORK_DIR/server/bin/lib/own/
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
214 cp $FLYS_SOURCE_DIR/river/gwt-client/target/gwt-client-1.0-SNAPSHOT.war $WORK_DIR/client/flys-${VERSION}.war
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
215 cp $FLYS_SOURCE_DIR/river/artifacts/target/dependency/* $WORK_DIR/server/bin/lib/
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
216
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
217 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
218 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
219 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
220
7797
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
221 echo "INFO: download WSPLGEN"
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
222 wget https://wald.intevation.org/frs/download.php/1496/wsplgen-linux-64bit-static.gz
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
223 gunzip wsplgen-linux-64bit-static.gz
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
224 echo "16d60047aa114d69e9435dbbe56b6981b4e1c445 wsplgen-linux-64bit-static" | \
f9637e6ecf6d Use latest WSPLGEN binary.
Tom Gottfried <tom@intevation.de>
parents: 7783
diff changeset
225 sha1sum -c
7816
286c09ff6fb8 Release script broke with r7814:242e790fb4ee.
Tom Gottfried <tom@intevation.de>
parents: 7813
diff changeset
226 mv wsplgen-linux-64bit-static $WORK_DIR/server/bin/wsplgen
286c09ff6fb8 Release script broke with r7814:242e790fb4ee.
Tom Gottfried <tom@intevation.de>
parents: 7813
diff changeset
227 chmod +x $WORK_DIR/server/bin/wsplgen
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
228
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
229 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
230 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
231 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
232 rm $WORK_DIR/server/bin/lib/hibernate-spatial-postgis*
5320
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
233 if [ ! -f $ORACLE_JDBC ]; then
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
234 echo "Could not find oracle jdbc in $ORACLE_JDBC"
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
235 echo "Please make sure that the ORACLE_JDBC variable is set correctly"
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
236 exit 1
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
237 fi
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
238 if [ ! -f $ORACLE_HIBERNATE ]; then
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
239 echo "Could not find hibernate-spatial-oracle in $ORACLE_HIBERNATE"
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
240 echo "Please make sure that the ORACLE_HIBERNATE variable is set correctly"
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
241 exit 1
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
242 fi
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
243 cp $ORACLE_HIBERNATE $ORACLE_JDBC $WORK_DIR/server/bin/lib/
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
244 else
8501
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
245 echo "INFO: remove Oracle libraries"
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
246 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
247 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
248 fi
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
249
8495
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
250
8501
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
251 echo "INFO: copy default server configuration to target destination"
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
252 cp -R $FLYS_SOURCE_DIR/river/artifacts/doc/conf $WORK_DIR/server/
4484
7e82d51c5a27 Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents: 4151
diff changeset
253
8495
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
254 if [ -n $DGM_PATH ]; then
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
255 sed -i -e "s@<dgm-path>/path/to/rivers/</dgm-path>@<dgm-path>${DGM_PATH}</dgm-path>@g" \
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
256 $WORK_DIR/server/conf/conf.xml
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
257 fi
5530
7f8d6b49afad Make FONT_PATH configurable in release script.
Andre Heinecke <aheinecke@intevation.de>
parents: 5493
diff changeset
258
8495
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
259 if [ -n $WIKI_URL ]; then
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
260 sed -i -e "s@<help-url>http://example.com</help-url>@<help-url>${WIKI_URL}</help-url>@g" \
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
261 $WORK_DIR/server/conf/conf.xml
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
262 fi
5268
df7028d0cb93 Add LOG_DIR to make release to configure a logging directory. And
Andre Heinecke <aheinecke@intevation.de>
parents: 5255
diff changeset
263
8495
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
264 if [ -d $SERVER_CONF ]; then
8501
c8d633c0971b Release script: remove installation specific defaults and give the possibility to overwrite any config-file in WEB-INF.
Tom Gottfried <tom@intevation.de>
parents: 8500
diff changeset
265 echo "INFO: copy custom server configuration to target destination"
8495
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
266 cp -R $SERVER_CONF/* $WORK_DIR/server/conf/
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
267 for file in `find $WORK_DIR/server/conf -type f`; do
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
268 sed -i -e "s@D4E_VERSION@${VERSION}@g" $file
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
269 done
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
270 fi
5602
a586153a277a Add DGM_PATH variable
Andre Heinecke <aheinecke@intevation.de>
parents: 5530
diff changeset
271
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
272
8495
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
273 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
274 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
275 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
276
5900
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
277 cp $FLYS_SOURCE_DIR/framework/artifact-database/doc/schema-h2.sql $WORK_DIR/artifactsdb/artifacts-h2.sql
8698e3284b7a Update after renaming and remove the binary artifact-database and common
Andre Heinecke <aheinecke@intevation.de>
parents: 5723
diff changeset
278 cp $FLYS_SOURCE_DIR/river/artifacts/doc/conf/datacage.sql $WORK_DIR/datacagedb/datacage.sql
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
279
7771
e2102c4b7b07 Change to work dir bevor creating artifacts and datacage db
Andre Heinecke <aheinecke@intevation.de>
parents: 7008
diff changeset
280 cd $WORK_DIR
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
281 $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
282 $SCRIPT_DIR/h2/createDatacage.sh $WORK_DIR/datacagedb/datacage.sql
7771
e2102c4b7b07 Change to work dir bevor creating artifacts and datacage db
Andre Heinecke <aheinecke@intevation.de>
parents: 7008
diff changeset
283 cd -
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
284
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
285 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
286 mv $WORK_DIR/datacagedb $WORK_DIR/server/
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
287
8495
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
288 if [ -f $INSTALL ]; then
8464
5dd6cc9fec1e Add possibility to pack install-script in release tarball.
Tom Gottfried <tom@intevation.de>
parents: 8450
diff changeset
289 echo "INFO: prepare custom installation script"
5dd6cc9fec1e Add possibility to pack install-script in release tarball.
Tom Gottfried <tom@intevation.de>
parents: 8450
diff changeset
290 cp $INSTALL $WORK_DIR
8495
dc0351c5d098 Artifact-server config in release script: remove installation specific defaults and give the possibility to overwrite any config-file.
Tom Gottfried <tom@intevation.de>
parents: 8494
diff changeset
291 sed -i "s/D4E_VERSION/$VERSION/g" $WORK_DIR/`basename $INSTALL`
8464
5dd6cc9fec1e Add possibility to pack install-script in release tarball.
Tom Gottfried <tom@intevation.de>
parents: 8450
diff changeset
292 fi
5dd6cc9fec1e Add possibility to pack install-script in release tarball.
Tom Gottfried <tom@intevation.de>
parents: 8450
diff changeset
293
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
294 echo "INFO: create tarball"
6612
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
295 if [ -d "$WORK_DIR/flys-$VERSION" ]; then
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
296 echo "INFO: removing old directory"
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
297 rm -rf "$WORK_DIR/flys-$VERSION"
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
298 fi
e5d8cbce3040 Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents: 6440
diff changeset
299
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
300 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
301 mv $WORK_DIR/server $WORK_DIR/client $WORK_DIR/flys-$VERSION
8464
5dd6cc9fec1e Add possibility to pack install-script in release tarball.
Tom Gottfried <tom@intevation.de>
parents: 8450
diff changeset
302 if [ -n $INSTALL ]; then
5dd6cc9fec1e Add possibility to pack install-script in release tarball.
Tom Gottfried <tom@intevation.de>
parents: 8450
diff changeset
303 mv $WORK_DIR/`basename $INSTALL` $WORK_DIR/flys-$VERSION
5dd6cc9fec1e Add possibility to pack install-script in release tarball.
Tom Gottfried <tom@intevation.de>
parents: 8450
diff changeset
304 fi
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
305 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
306 tar cfz flys-$VERSION.tar.gz flys-$VERSION
7948
36f634917104 Override bad defaults of isc-maven-plugin. Please set DEFAULT_WD in make_release_sh to something individual if you are on a multi-user system.
Tom Gottfried <tom@intevation.de>
parents: 7946
diff changeset
307 #echo "INFO: cleanup"
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
308 #rm -r $WORK_DIR/flys-$VERSION
4065
9d404069f361 Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
309
5251
8fa0c522bef3 Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents: 5220
diff changeset
310 echo "DONE: $WORK_DIR/flys-$VERSION.tar.gz"
5320
a7778435a4af Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents: 5268
diff changeset
311 echo "Changelog: $WORK_DIR/changes_$OLD_REV-$VERSION.txt"

http://dive4elements.wald.intevation.org