-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-all-iccs.sh
executable file
·95 lines (50 loc) · 2.68 KB
/
build-all-iccs.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
#you database port
DB_PORT=8889 # Set this to your mysql port
## You shouldn't need to change anything beneath this line
CURPATH=`cd $(dirname pwd);pwd`;
OUT="$CURPATH/out"
REPOS="$CURPATH/repos"
MAVEN_REPO="$CURPATH/maven"; #this is where downloaded jars are saved
# ###WARNING####
# this directory is deleted during the build so dont put
# your home directory!!!
echo $CURPATH;
echo "Create output directory $OUT"
if [ -d "$OUT" ];
then
echo "Output directory exists... cleaning up ($OUT)"
rm -rf "$OUT/*"
else
mkdir -p $OUT
fi
echo "Do we need to clean up cached jars $MAVEN_REPO?"
if [ -d "$MAVEN_REPO" ];
then
echo "Previous maven build repo($MAVEN_REPO) exists lets make sure it is clean"
rm -rf "$MAVEN_REPO/*"
fi
function pull_or_clone(){
echo "Checking if previous repo $CURPATH/$1 exists";
if [ -d $CURPATH/$1 ];
then
echo "Updating $CURPATH/$1";
cd $CURPATH/$1; git pull;
else
echo "Checking out $2 to $CURPATH"
cd $CURPATH; git clone $2
fi
}
pull_or_clone eu.alert-project.iccs.events git://github.com/iccs/eu.alert-project.iccs.events.git
pull_or_clone MLSensor git://github.com/iccs/MLSensor.git
pull_or_clone Recommender git://github.com/iccs/Recommender.git
pull_or_clone STARDOM git://github.com/iccs/STARDOM.git
#these are the maven calls if you wish to do them on your own, they should be done in this order
cd "$CURPATH/eu.alert-project.iccs.events/eu.alert-project.iccs.events.core" && mvn clean compile package install -Duser.home="$MAVEN_REPO" -Dmaven.test.skip=true -Denv=prod -Ddb.port=$DB_PORT
cd "$CURPATH/Recommender/eu.alert-project.iccs.recommender.core" && mvn clean compile package install -Duser.home="$MAVEN_REPO" -Denv=prod -Dmaven.test.skip=true -Ddb.port=$DB_PORT
cd "$CURPATH/STARDOM/eu.alert-project.iccs.stardom.core" && mvn clean compile package install -Duser.home="$MAVEN_REPO" -Denv=prod -Dmaven.test.skip=true -Ddb.port=$DB_PORT
cd "$CURPATH/MLSensor/eu.alert-project.iccs.mlsensor.core" && mvn clean compile package install -Duser.home="$MAVEN_REPO" -Dmaven.test.skip=true -Denv=prod -Ddb.port=$DB_PORT
cd "$CURPATH/MLSensor/eu.alert-project.iccs.mlsensor.assemble" && mvn clean compile package install -Duser.home="$MAVEN_REPO" -Dmaven.test.skip=true -Denv=prod -Ddb.port=$DB_PORT
cp "$CURPATH/STARDOM/eu.alert-project.iccs.stardom.core/eu.alert-project.iccs.stardom.assemble/target/"assemble-*-all.zip "$OUT"
cp "$CURPATH/Recommender/eu.alert-project.iccs.recommender.core/eu.alert-project.iccs.recommender.assemble/target/"recommender-*-bin.zip "$OUT"
cp "$CURPATH/MLSensor/eu.alert-project.iccs.mlsensor.core/eu.alert-project.iccs.mlsensor.assembler/target/"mlsensor-*-bin.zip "$OUT"