-
Notifications
You must be signed in to change notification settings - Fork 1
/
lunch.sh
executable file
·53 lines (45 loc) · 1.87 KB
/
lunch.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
# Script for sarting the bots ##################################################
#
# This script will always step into the single projects and run a test + run
#
# -r flag the script will package the common library used into the bots
################################################################################
echo "################################################################################"
echo "# Welcome to the bot starting script #"
echo "# #"
echo "################################################################################"
TEST=false # Run sbt test on the dependent libs and infrastructure
SIMULATION=false # TEST, but not sbt run
WEBHOOK=false # Runs the webhook instead of the polling one
while getopts dtsw option
do
case "${option}"
in
t) TEST=true
echo "selected the Test option";;
s) SIMULATION=true
echo "selected the Simulation option";;
w) WEBHOOK=true
echo "selected the webhook opton";;
?) echo "no options selected"
esac
done
sbt --supershell=false fix
if [[ "$TEST" == true || "$SIMULATION" == true ]] ;
then
echo "-------------------------Running Tests-------------------------"
sbt --supershell=false test
fi
if [ "$SIMULATION" = false ] ;
then
echo "-------------------------Assembly-------------------------"
sbt --supershell=false main/assembly
if [ "$WEBHOOK" = false ] ;
then
echo "-------------------------Run Polling Bots-------------------------"
(cd ./main/target/scala-2.13/; java -cp main.jar com.benkio.main.MainPolling)
else
echo "-------------------------Run Webhook Bots-------------------------"
(cd ./main/target/scala-2.13/; java -cp main.jar com.benkio.main.MainWebhook)
fi
fi