forked from geosolutions-it/MapStore2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·62 lines (53 loc) · 1.22 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
#!/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 `release` 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 `release` to build also the binary package)
#
set -e
echo "Running NPM install to update dependencies"
echo `date`
npm install
echo "Building MS2 bundles"
echo `date`
npm run compile
echo "Cleanup Documentation"
echo `date`
npm run cleandoc
echo "Checking syntax"
echo `date`
npm run lint
echo "Run MapStore2 tests"
echo `date`
npm test
echo "Creating Documentation"
echo `date`
npm run doc
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 cleandoc