You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
576 B
42 lines
576 B
3 years ago
|
#!/bin/bash
|
||
|
|
||
|
mode=`cat system.conf | awk -F = '{print$2}'`
|
||
|
|
||
|
if [ -z "$mode" ]; then
|
||
|
echo "mode is not set"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
project=`echo $mode | awk -F - '{print $1}'`
|
||
|
|
||
|
if [ -z "$project" ]; then
|
||
|
echo "mode format is wrong"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
logdir=/var/www/data/log/luigi/$project
|
||
|
if [ ! -d "$logdir" ];then
|
||
|
mkdir -p $logdir
|
||
|
fi
|
||
|
|
||
|
jardir=jar
|
||
|
if [ ! -d "$jardir" ];then
|
||
|
mkdir $jardir
|
||
|
fi
|
||
|
|
||
|
|
||
|
rm -rf logs
|
||
|
ln -s $logdir logs
|
||
|
|
||
|
|
||
|
mvn clean package -DskipTests -U > /dev/null
|
||
|
|
||
|
r=$?
|
||
|
if [ "$r" == "0" ] ; then
|
||
|
echo 'build success'
|
||
|
else
|
||
|
echo 'build fail'
|
||
|
exit 1
|
||
|
fi
|
||
|
|