Mercurial > dive4elements > river
annotate contrib/make_flys_release/make_release.sh @ 9679:21c89e39ca72 3.2.x 3.2.3
Avoid using Mercurial extension
purge is not activated by default and using a fresh temp directory
with new repo clones is now the default, anyhow.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 04 Jun 2020 14:53:02 +0200 |
parents | 59ad66feb8f8 |
children | 8e5a8430b89c |
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> |
9673
e04851177bb7
Remove default user name for pushing tags
Tom Gottfried <tom@intevation.de>
parents:
8866
diff
changeset
|
6 # Tom Gottfried <tom@intevation.de> |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
7 # |
9673
e04851177bb7
Remove default user name for pushing tags
Tom Gottfried <tom@intevation.de>
parents:
8866
diff
changeset
|
8 # Copyright (C) 2011 - 2014, 2020 by Bundesanstalt für Gewässerkunde |
8493
07a369e6e277
Correct header for release script.
Tom Gottfried <tom@intevation.de>
parents:
8485
diff
changeset
|
9 # 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
|
10 # |
8493
07a369e6e277
Correct header for release script.
Tom Gottfried <tom@intevation.de>
parents:
8485
diff
changeset
|
11 # 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
|
12 # and comes with ABSOLUTELY NO WARRANTY! Check out the |
07a369e6e277
Correct header for release script.
Tom Gottfried <tom@intevation.de>
parents:
8485
diff
changeset
|
13 # documentation coming with Dive4Elements River for details. |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 |
5220
613d2f494728
Handle return codes in the make_flys_release script
Andre Heinecke <aheinecke@intevation.de>
parents:
5119
diff
changeset
|
15 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
|
16 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
|
17 DEFAULT_WD=/tmp/flys-release |
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" |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
25 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
|
26 usage(){ |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
27 cat << EOF |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
29 usage: $0 [options] VERSION |
4484
7e82d51c5a27
Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4151
diff
changeset
|
30 |
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
|
31 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
|
32 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
33 OPTIONS: |
8494
76994a0187fa
Do not give Oracle-JARs with hardcoded personal path in release script.
Tom Gottfried <tom@intevation.de>
parents:
8493
diff
changeset
|
34 -?, --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
|
35 -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
|
36 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
|
37 -t Tag the current default branch as "VERSION" |
9673
e04851177bb7
Remove default user name for pushing tags
Tom Gottfried <tom@intevation.de>
parents:
8866
diff
changeset
|
38 Note that \$USER is used as the repository user name |
e04851177bb7
Remove default user name for pushing tags
Tom Gottfried <tom@intevation.de>
parents:
8866
diff
changeset
|
39 for pushing the tags. |
8494
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. |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
41 Suitable jar-file for JDBC driver has to be given with |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
42 the environment variable ORACLE_JDBC |
8673
25f9ab25affd
Correct usage section in release script.
Tom Gottfried <tom@intevation.de>
parents:
8523
diff
changeset
|
43 VERSION must specify a tag (usually MAYOR.MINOR.PATCH) or a branch name. |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
44 EOF |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
45 exit 0 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
46 } |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
47 # --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
|
48 # --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
|
49 # --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
|
50 # --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
|
51 # --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
|
52 # --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
|
53 # --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
|
54 # --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
|
55 # --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
|
56 # --seddb-back Sediment db backend. Default: $SEDDBBACK |
4494
334c68344eb5
Fix hard coded mapserver url
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4493
diff
changeset
|
57 |
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
|
58 # customizable variables |
7813
56870a7d9811
Replace model uuid of 'Beispielfluss' with model_uuid of 'Elbe'.
Raimund Renkert <rrenkert@intevation.de>
parents:
7804
diff
changeset
|
59 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
|
60 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
61 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
|
62 -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
|
63 -n $0 -- "$@"` |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
65 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
|
66 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
|
67 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
|
68 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
|
69 "-?"|"--help") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
70 usage;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
71 "--") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
72 shift |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
73 break;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
74 "-w") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
75 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
|
76 shift 2;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
77 "-o"|"--oracle") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
78 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
|
79 shift;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
80 "-t") |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
81 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
|
82 shift;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
83 *) |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
84 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
|
85 usage;; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
86 esac |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
87 done |
4484
7e82d51c5a27
Improved build script
Sascha L. Teichmann <teichmann@intevation.de>
parents:
4151
diff
changeset
|
88 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
89 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
|
90 usage |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
91 fi |
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 VERSION=$1 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
94 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
95 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
|
96 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
|
97 fi |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
98 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
99 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
|
100 |
8753
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
101 if [ -z "$SMARTGWT" ]; then |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
102 echo "ERROR: Variable SMARTGWT not set." |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
103 echo "Please set this variable to point to the smartgwt .jar archive to be used." |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
104 exit 1 |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
105 fi |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
106 |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
107 if [ ! -f "$SMARTGWT" ]; then |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
108 echo "ERROR: Failed to find smartgwt archive at: '$SMARTGWT'" |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
109 exit 1 |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
110 fi |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
111 |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
112 if [ ! -d "$FLYS_SOURCE_DIR" ]; then |
9675
59ad66feb8f8
Get rid of hard coded default checkout directory
Tom Gottfried <tom@intevation.de>
parents:
9673
diff
changeset
|
113 mkdir -p ${FLYS_SOURCE_DIR:=$(mktemp -d)} |
59ad66feb8f8
Get rid of hard coded default checkout directory
Tom Gottfried <tom@intevation.de>
parents:
9673
diff
changeset
|
114 echo "Will use source code checkouts in $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
|
115 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
|
116 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
|
117 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
|
118 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
|
119 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
|
120 else |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
121 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
|
122 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
|
123 for repo in $REPOS; do |
9679
21c89e39ca72
Avoid using Mercurial extension
Tom Gottfried <tom@intevation.de>
parents:
9675
diff
changeset
|
124 cd $repo && hg revert -a && hg pull -u && cd - |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
125 done; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
126 fi |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
127 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
128 if [ "$DO_TAG" = "TRUE" ]; then |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
129 echo "INFO: Tagging version $VERSION" |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
130 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
|
131 cd $repo |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
132 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
|
133 echo "" |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
134 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
|
135 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
|
136 echo "" |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
137 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
|
138 read |
5320
a7778435a4af
Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents:
5268
diff
changeset
|
139 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
|
140 hg tag $VERSION -m "Added tag $VERSION for changeset $CHANGESET" |
9673
e04851177bb7
Remove default user name for pushing tags
Tom Gottfried <tom@intevation.de>
parents:
8866
diff
changeset
|
141 hg push ssh://$USER@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
|
142 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
|
143 echo "#############################################################################" \ |
a7778435a4af
Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents:
5268
diff
changeset
|
144 >> $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
|
145 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
|
146 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
|
147 done; |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
148 fi |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
149 |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
150 # 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
|
151 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
|
152 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
|
153 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
|
154 then |
8866
f5fa2467f9c0
Build script: Do not require branch or tag in all repositories.
Tom Gottfried <tom@intevation.de>
parents:
8822
diff
changeset
|
155 echo "WARNING: No tag or branch $VERSION found in repository of $repo!" |
f5fa2467f9c0
Build script: Do not require branch or tag in all repositories.
Tom Gottfried <tom@intevation.de>
parents:
8822
diff
changeset
|
156 echo " Will fallback to 'default'!" |
f5fa2467f9c0
Build script: Do not require branch or tag in all repositories.
Tom Gottfried <tom@intevation.de>
parents:
8822
diff
changeset
|
157 hg up 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
|
158 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
|
159 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
|
160 fi |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
161 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
|
162 done |
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
163 |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
164 |
8754
574f8b80799f
Add quotes in Path tests to avoid wrong results if variables are unset
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8753
diff
changeset
|
165 if [ ! -f "$FLYS_SOURCE_DIR/OpenLayers-2.11.tar.gz" ]; then |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
166 echo "INFO: download OpenLayers-2.11 for client" |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
167 cd $FLYS_SOURCE_DIR |
8822
cd8fce40f151
OpenLayers download moved.
Tom Gottfried <tom@intevation.de>
parents:
8754
diff
changeset
|
168 curl -LO "https://github.com/openlayers/ol2/releases/download/release-2.11/OpenLayers-2.11.tar.gz" |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
169 tar xvfz OpenLayers-2.11.tar.gz |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
170 # TODO: Remove more superfluous OpenLayers stuff. |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
171 rm -rf OpenLayers-2.11/doc |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
172 rm -rf OpenLayers-2.11/tests |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
173 rm -rf OpenLayers-2.11/examples |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
174 cd $WORK_DIR |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
175 fi |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
176 cp -r $FLYS_SOURCE_DIR/OpenLayers-2.11 \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
177 $FLYS_SOURCE_DIR/river/gwt-client/src/main/webapp/ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
178 |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
179 |
8753
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
180 echo "INFO: Installing smartGWT" |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
181 |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
182 mvn install:install-file -Dfile="$SMARTGWT" -Dversion=4.1-p20141119 \ |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
183 -DartifactId=smartgwt-lgpl -DgroupId=com.isomorphic.smartgwt.lgpl \ |
340111f40f2d
(issue1824) Install smartgwt from file base on SMARTGWT environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8751
diff
changeset
|
184 -Dpackaging=jar |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
185 |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
186 echo "INFO: compile sources" |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
187 mvn -f $FLYS_SOURCE_DIR/framework/pom.xml clean compile install |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
188 mvn -f $FLYS_SOURCE_DIR/river/backend/pom.xml clean compile install |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
189 mvn -f $FLYS_SOURCE_DIR/river/artifacts/pom.xml clean compile |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
190 mvn -f $FLYS_SOURCE_DIR/http-client/pom.xml clean compile install |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
191 # gwt-client has to be compiled later to allow custom CLIENT_CONF |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
192 |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
193 echo "INFO: create h2 database for artifacts and datacage" |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
194 cd $FLYS_SOURCE_DIR/river/artifacts |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
195 rm -rf artifactsdb datacagedb |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
196 $FLYS_SOURCE_DIR/framework/artifact-database/bin/createArtifacts.sh |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
197 $FLYS_SOURCE_DIR/river/artifacts/bin/createDatacage.sh |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
198 cd - |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
199 |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
200 echo "INFO: download WSPLGEN" |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
201 cd $WORK_DIR |
8751
5b4bd0680160
Do not die if work dir is clean.
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8740
diff
changeset
|
202 rm -f wsplgen-linux-*bit-static |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
203 wget \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
204 https://wald.intevation.org/frs/download.php/1496/wsplgen-linux-64bit-static.gz \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
205 https://wald.intevation.org/frs/download.php/1498/wsplgen-linux-32bit-static.gz |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
206 gunzip wsplgen-linux-64bit-static.gz wsplgen-linux-32bit-static.gz |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
207 chmod +x wsplgen-linux-* |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
208 cp wsplgen-linux-32bit-static $FLYS_SOURCE_DIR/river/artifacts/bin/wsplgen |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
209 cd - |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
210 |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
211 if [ "$DO_TAG" = "TRUE" ]; then |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
212 echo "INFO: Building packages for publication" |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
213 cd $FLYS_SOURCE_DIR/river/artifacts |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
214 mvn package assembly:single |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
215 mv target/river-artifacts-1.0-SNAPSHOT-bin.tar.bz2 \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
216 $WORK_DIR/d4e-river-$VERSION.tar.bz2 && cd .. |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
217 cd gwt-client && mvn clean compile package |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
218 mv target/gwt-client-1.0-SNAPSHOT.war \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
219 $WORK_DIR/d4e-river-$VERSION.war && cd .. |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
220 fi |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
221 |
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
|
222 |
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
|
223 echo "INFO: Preparing configuration of web client" |
5692
d2c6d4ca6841
Add print url to relase script
Andre Heinecke <aheinecke@intevation.de>
parents:
5678
diff
changeset
|
224 |
d2c6d4ca6841
Add print url to relase script
Andre Heinecke <aheinecke@intevation.de>
parents:
5678
diff
changeset
|
225 #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
|
226 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
|
227 $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
|
228 |
8754
574f8b80799f
Add quotes in Path tests to avoid wrong results if variables are unset
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8753
diff
changeset
|
229 if [ -d "$WEBINF" ]; 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
|
230 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
|
231 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
|
232 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
|
233 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
|
234 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
|
235 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
|
236 fi |
1431d1af84d7
Remove not publicly available WMS services and enable custom configuration through release script.
Tom Gottfried <tom@intevation.de>
parents:
7797
diff
changeset
|
237 |
8754
574f8b80799f
Add quotes in Path tests to avoid wrong results if variables are unset
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8753
diff
changeset
|
238 if [ -f "$CLIENT_CONF" ]; then |
8506
da9365fc2f42
(issue1777) Evaluate CLIENT_CONF environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8501
diff
changeset
|
239 echo "INFO: copy custom java script client configuration to target destination" |
8754
574f8b80799f
Add quotes in Path tests to avoid wrong results if variables are unset
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8753
diff
changeset
|
240 cp "$CLIENT_CONF" \ |
8506
da9365fc2f42
(issue1777) Evaluate CLIENT_CONF environment variable
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8501
diff
changeset
|
241 $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
|
242 fi |
8384
d4a2c7b83087
Add possibility to give custom config for server log.
Tom Gottfried <tom@intevation.de>
parents:
8245
diff
changeset
|
243 |
8754
574f8b80799f
Add quotes in Path tests to avoid wrong results if variables are unset
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8753
diff
changeset
|
244 if [ -n "$DGM_PATH" ]; then |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
245 sed -i -e "s@<dgm-path>.*</dgm-path>@<dgm-path>${DGM_PATH}</dgm-path>@g" \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
246 $FLYS_SOURCE_DIR/river/artifacts/doc/conf/conf.xml |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
247 fi |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
248 |
8754
574f8b80799f
Add quotes in Path tests to avoid wrong results if variables are unset
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8753
diff
changeset
|
249 if [ -n "$WIKI_URL" ]; then |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
250 sed -i -e "s@<help-url>http://example.com</help-url>@<help-url>${WIKI_URL}</help-url>@g" \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
251 $FLYS_SOURCE_DIR/river/artifacts/doc/conf/conf.xml |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
252 fi |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
253 |
8754
574f8b80799f
Add quotes in Path tests to avoid wrong results if variables are unset
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8753
diff
changeset
|
254 if [ -d "$SERVER_CONF" ]; then |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
255 echo "INFO: copy custom server configuration to target destination" |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
256 cp -R $SERVER_CONF/* $FLYS_SOURCE_DIR/river/artifacts/doc/conf/ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
257 for file in `find $FLYS_SOURCE_DIR/river/artifacts/doc/conf -type f`; do |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
258 sed -i -e "s@D4E_VERSION@${VERSION}@g" $file |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
259 done |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
260 fi |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
261 |
7939
6e852a6c72f2
Use SmartGWT version 4.1p. Updated release script to download SmartGWT.
Raimund Renkert <rrenkert@intevation.de>
parents:
7837
diff
changeset
|
262 |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
263 echo "INFO: compile and build sources" |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
264 cp $WORK_DIR/wsplgen-linux-64bit-static \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
265 $FLYS_SOURCE_DIR/river/artifacts/bin/wsplgen |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
266 |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
267 if [ "$BUILD_ORACLE" = "TRUE" ]; then |
5320
a7778435a4af
Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents:
5268
diff
changeset
|
268 if [ ! -f $ORACLE_JDBC ]; then |
a7778435a4af
Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents:
5268
diff
changeset
|
269 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
|
270 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
|
271 exit 1 |
a7778435a4af
Improve oracle integration and generate changelog when tagging
Andre Heinecke <aheinecke@intevation.de>
parents:
5268
diff
changeset
|
272 fi |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
273 mvn install:install-file -DgroupId=ojdbc -DartifactId=ojdbc \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
274 -Dversion=0 -Dpackaging=jar -Dfile=$ORACLE_JDBC -DgeneratePom=true |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
275 mvn -f $FLYS_SOURCE_DIR/river/backend/pom-oracle.xml clean compile install |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
276 mvn -f $FLYS_SOURCE_DIR/river/artifacts/pom-oracle.xml \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
277 package assembly:single |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
278 else |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
279 mvn -f $FLYS_SOURCE_DIR/river/artifacts/pom.xml package assembly:single |
5251
8fa0c522bef3
Improve make_release script to optinally handle tagging and be more generic.
Andre Heinecke <aheinecke@intevation.de>
parents:
5220
diff
changeset
|
280 fi |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
281 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
|
282 |
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
|
283 |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
284 echo "INFO: create tarball" |
7771
e2102c4b7b07
Change to work dir bevor creating artifacts and datacage db
Andre Heinecke <aheinecke@intevation.de>
parents:
7008
diff
changeset
|
285 cd $WORK_DIR |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
286 mv $FLYS_SOURCE_DIR/river/artifacts/target/river-artifacts-1.0-SNAPSHOT-bin.tar \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
287 flys-$VERSION.tar |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
288 mv $FLYS_SOURCE_DIR/river/gwt-client/target/gwt-client-1.0-SNAPSHOT.war \ |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
289 flys-${VERSION}.war |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
290 tar -rf flys-$VERSION.tar flys-${VERSION}.war |
4065
9d404069f361
Added build script for FLYS release.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
291 |
8754
574f8b80799f
Add quotes in Path tests to avoid wrong results if variables are unset
Andre Heinecke <andre.heinecke@intevation.de>
parents:
8753
diff
changeset
|
292 if [ -f "$INSTALL" ]; then |
8464
5dd6cc9fec1e
Add possibility to pack install-script in release tarball.
Tom Gottfried <tom@intevation.de>
parents:
8450
diff
changeset
|
293 echo "INFO: prepare custom installation script" |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
294 cp $INSTALL . |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
295 sed -i "s/D4E_VERSION/$VERSION/g" ./`basename $INSTALL` |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
296 tar -rf flys-$VERSION.tar `basename $INSTALL` |
6612
e5d8cbce3040
Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents:
6440
diff
changeset
|
297 fi |
e5d8cbce3040
Add cleanup to the release script
Andre Heinecke <aheinecke@intevation.de>
parents:
6440
diff
changeset
|
298 |
8523
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
299 ## TODO: tag with maven and include basedir with correct name in assembly ## |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
300 rm -rf flys-$VERSION && mkdir flys-$VERSION |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
301 tar -xf flys-$VERSION.tar -C flys-$VERSION |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
302 tar cfz flys-$VERSION.tar.gz flys-$VERSION |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
303 ## |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
304 |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
305 if [ "$DO_TAG" = "TRUE" ]; then |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
306 echo "Binary-packages for publication:" |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
307 echo "_ $WORK_DIR/d4e-river-$VERSION.tar.bz2" |
e3f032870e7a
Release script: build binaries for publication when tagging and slightly mavenize the whole process.
Tom Gottfried <tom@intevation.de>
parents:
8512
diff
changeset
|
308 echo "_ $WORK_DIR/d4e-river-$VERSION.war" |
8464
5dd6cc9fec1e
Add possibility to pack install-script in release tarball.
Tom Gottfried <tom@intevation.de>
parents:
8450
diff
changeset
|
309 fi |
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" |