create_client_delivery.sh 913 Bytes
Newer Older
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
#!/bin/bash
#
# script to build and pack the project as archive for delivery to client
#
# tobias.assmann@ecsec.de

TRG_DIR=docker_for-client-delivery
TRG_ARC=eid-server.tgz

echo "checking java version ..."
command -v java 2>&1 >> /dev/null || { echo "no java found"; exit 1;}
java -version 2>&1 | awk -F '"' '/version/ {print $2}' | grep -q 1.8 || { echo "java version is not 1.8"; exit 1;}

echo "build the whole project ..."
mvn clean install || { echo "maven build failed. please check!"; exit 1; }

echo "copy builded stuff to $TRG_DIR ..."
cp configuration-wizard/target/configuration-wizard-1.2.0-SNAPSHOT.jar $TRG_DIR/poseidas-configuration-wizard.jar
cp docker/sam/sam-1.2.0-SNAPSHOT-thorntail.jar $TRG_DIR/sam/sam-1.2.0-SNAPSHOT-thorntail.jar
cp docker/ssa/dist/ssa-server.war $TRG_DIR/ssa/dist/ssa-server.war

echo "archiving $TRG_DIR to $TRG_ARC ..."
tar -cvzf $TRG_ARC $TRG_DIR

echo "done"

exit 0