annotate contrib/make_flys_release/bin/make-importer-package.sh @ 8670:32682fa2127d

Move importer configuration to a single place.
author Tom Gottfried <tom@intevation.de>
date Thu, 09 Apr 2015 10:52:51 +0200
parents f7d3fc619976
children ae3df0f96e15
rev   line source
5097
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
1 #!/bin/bash
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
2 set -e
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
3
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
4 # See README for more information
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
5
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
6 # The working directory. Resulting tarball will be placed in the directory above.
5520
d5e1e4d9559e compile manual from within importer packaging script
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5491
diff changeset
7 PKG_DIR=~/tmp/flys-importer
5097
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8 # Path to the flys checkout
5855
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
9 FLYS_DIR=~/flys/river/
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
10 # Tarball that will be extracted into flys-importer/opt
5179
4355b4cecef8 Improve importer packaging by just expecting a tarball with
Andre Heinecke <aheinecke@intevation.de>
parents: 5172
diff changeset
11 EXTRAS=$1
5097
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
13 rm -fr $PKG_DIR
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14 mkdir -p $PKG_DIR/hydr_morph
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15 mkdir -p $PKG_DIR/geodaesie
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16 mkdir -p $PKG_DIR/opt/lib64
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
17 mkdir -p $PKG_DIR/schema
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18
5855
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
19 cd ${FLYS_DIR}/backend
5097
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20 mvn -f pom-oracle.xml clean compile assembly:single
5855
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
21 cp target/backend-1.0-SNAPSHOT-jar-with-dependencies.jar \
5097
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22 $PKG_DIR/hydr_morph/importer.jar
5172
a51515056c45 Package postgresql importer and import_river script
Andre Heinecke <aheinecke@intevation.de>
parents: 5163
diff changeset
23 mvn -f pom.xml clean compile assembly:single
5855
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
24 cp target/river-backend-1.0-SNAPSHOT-jar-with-dependencies.jar \
5172
a51515056c45 Package postgresql importer and import_river script
Andre Heinecke <aheinecke@intevation.de>
parents: 5163
diff changeset
25 $PKG_DIR/hydr_morph/importer_psql.jar
5855
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
26 cp ${FLYS_DIR}/backend/contrib/shpimporter/*.py $PKG_DIR/geodaesie
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
27 cp ${FLYS_DIR}/backend/contrib/run_geo.sh \
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
28 ${FLYS_DIR}/backend/contrib/run_hydr_morph.sh \
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
29 ${FLYS_DIR}/backend/contrib/import_river.sh \
5097
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
30 $PKG_DIR
8670
32682fa2127d Move importer configuration to a single place.
Tom Gottfried <tom@intevation.de>
parents: 7334
diff changeset
31 cp -r ${FLYS_DIR}/backend/doc/conf $PKG_DIR/
5199
29d79741c2fe Fix quoting of EXTRAS in packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5186
diff changeset
32 if [ -f "$EXTRAS" ]; then
5179
4355b4cecef8 Improve importer packaging by just expecting a tarball with
Andre Heinecke <aheinecke@intevation.de>
parents: 5172
diff changeset
33 cd $PKG_DIR
5199
29d79741c2fe Fix quoting of EXTRAS in packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5186
diff changeset
34 tar -xzf "$EXTRAS"
5179
4355b4cecef8 Improve importer packaging by just expecting a tarball with
Andre Heinecke <aheinecke@intevation.de>
parents: 5172
diff changeset
35 fi
5097
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
36
5855
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
37 cp ${FLYS_DIR}/backend/doc/schema/*.sql $PKG_DIR/schema
5520
d5e1e4d9559e compile manual from within importer packaging script
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5491
diff changeset
38
6814
e41059fb4073 Importer Doc: Update title page automatically.
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5855
diff changeset
39 # create PDF of manual
7334
f7d3fc619976 Importer manual: use unique revision identifier.
Tom Gottfried <tom@intevation.de>
parents: 7331
diff changeset
40 REV=`hg parent | sed -n '1s/[[:alnum:]]*: *\([0-9]*:.*\)/\1/;1p'`
5855
cff1eea9854f adjust importer build-script to new names
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5520
diff changeset
41 cd ${FLYS_DIR}/backend/doc/documentation/de/
7334
f7d3fc619976 Importer manual: use unique revision identifier.
Tom Gottfried <tom@intevation.de>
parents: 7331
diff changeset
42 sed -i "s/documentrevision..rev.*/documentrevision}{rev$REV}/" \
6814
e41059fb4073 Importer Doc: Update title page automatically.
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5855
diff changeset
43 importer-manual.tex
7331
bb9735fbb680 Importer packaging: run pdflatex three times to get references and page numbering right.
Tom Gottfried <tom@intevation.de>
parents: 6814
diff changeset
44 # run pdflatex three times to get references and page numbering right
bb9735fbb680 Importer packaging: run pdflatex three times to get references and page numbering right.
Tom Gottfried <tom@intevation.de>
parents: 6814
diff changeset
45 pdflatex importer-manual.tex
bb9735fbb680 Importer packaging: run pdflatex three times to get references and page numbering right.
Tom Gottfried <tom@intevation.de>
parents: 6814
diff changeset
46 pdflatex importer-manual.tex
6814
e41059fb4073 Importer Doc: Update title page automatically.
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5855
diff changeset
47 pdflatex importer-manual.tex
5520
d5e1e4d9559e compile manual from within importer packaging script
Tom Gottfried <tom.gottfried@intevation.de>
parents: 5491
diff changeset
48 cp importer-manual.pdf $PKG_DIR
5097
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
49
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
50 sed -i 's/shpimporter\/shp/geodaesie\/shp/' $PKG_DIR/run_geo.sh
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
51
415ac9bc5a56 Add importer packaging script and some doc about it
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
52 cd $PKG_DIR/..
5417
5422a798f105 Use minute instead of month as the last number of the date/timestamp
Andre Heinecke <aheinecke@intevation.de>
parents: 5199
diff changeset
53 DATE=$(date +%Y%m%d%H%M)
5179
4355b4cecef8 Improve importer packaging by just expecting a tarball with
Andre Heinecke <aheinecke@intevation.de>
parents: 5172
diff changeset
54 tar -czf flys-importer_${DATE}.tar.gz flys-importer
4355b4cecef8 Improve importer packaging by just expecting a tarball with
Andre Heinecke <aheinecke@intevation.de>
parents: 5172
diff changeset
55 sha1sum flys-importer_${DATE}.tar.gz > flys-importer_${DATE}.tar.gz.sha1
5186
801866a89ee0 Fix syntax error in importer packaging script
Andre Heinecke <aheinecke@intevation.de>
parents: 5179
diff changeset
56 echo Package is at: `readlink -f flys-importer_${DATE}.tar.gz`

http://dive4elements.wald.intevation.org