forked from geosolutions-it/MapStore2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·68 lines (59 loc) · 1.38 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
#
# Builds MapStore2, doing all needed clean-ups tests and checks and adding documentation.
# You should use this script to generate a full valid MapStore2 package.
# Use the `binary` profile to build also the binary package
#
# Usage:
# $ ./build.sh [version] [profiles]
# * version: The version for the final package
# * profiles: profiles for mvn build.
#
# use `binary` to build also the binary package
# use `printing` to include printing module in the ware
# use `printing-bundle` to build also the zip bundle
#
# Example
# $ ./build.sh 2022.02.00 binary
set -e
echo "Running NPM install to update dependencies"
echo `date`
npm install
echo "Building MS2 bundles"
echo `date`
npm run fe:build
echo "Cleanup Documentation"
echo `date`
npm run jsdoc:clean
echo "Checking syntax"
echo `date`
npm run lint
echo "Run MapStore2 tests"
echo `date`
npm test
echo "Creating Documentation"
echo `date`
npm run jsdoc:build
echo "Building final WAR package"
echo `date`
if [ $# -eq 0 ]
then
cd java
mvn clean install
cd ..
mvn clean install
elif [ $# -eq 1 ]
then
cd java
mvn clean install
cd ..
mvn clean install -Dmapstore2.version=$1
else
cd java
mvn clean install -Dmapstore2.version=$1 -P$2
cd ..
mvn clean install -Dmapstore2.version=$1 -P$2
fi
echo "Final Cleanup"
echo `date`
npm run jsdoc:clean