-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathbuild-projects.sh
executable file
·49 lines (40 loc) · 1.27 KB
/
build-projects.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
#!/bin/sh
# The build order: (The command line arguments should be in this order as well)
# nimbus-parent - it builds:
# nimbus-core
# nimbus-entity-dsl
# nimbus-test
# nimbus-ui
# nimbus-extn-activiti
# nimbus-starter
PROJECTS=".,nimbus-ui,nimbus-extn-activiti,nimbus-starter";
while getopts p:m: option
do
case "${option}"
in
p) PROJECTS=${OPTARG};;
m) MVN_ARGS=${OPTARG};;
esac
done
IFS=',' read -ra NAMES <<< "$PROJECTS"
echo "Running build-projects.sh with the following parameters..."
echo "NAMES = $NAMES";
echo "MVN_ARGS = $MVN_ARGS";
for i in "${NAMES[@]}"; do
str=$i;
echo "####################################################################"
echo "### Starting to build: $str "
echo "####################################################################"
BUILD_PROFILES="";
if [[ "$i" == "nimbus-ui" ]]; then
BUILD_PROFILES="devbuild"
fi
if [[ -z "$BUILD_PROFILES" ]]; then
mvn clean install -f $str/pom.xml $MVN_ARGS
else
mvn clean install -f $str/pom.xml $MVN_ARGS -P $BUILD_PROFILES
fi
echo "####################################################################"
echo "### Finished building: $str "
echo "####################################################################"
done