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.
 
 

34 lines
811 B

#!/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}'`
profile=`echo $mode | awk -F - '{print $2}'`
if [ -z "$project" ]; then
echo "mode format is wrong"
exit 1
fi
if [ -z "$profile" ]; then
echo "mode format is wrong"
exit 1
fi
version=1.0-SNAPSHOT
jar=luigi-$project-$version.jar
targetdir=luigi-$project/target
projectmem=256m
if [ "$profile" = "prod" ]
then
projectmem=512m
fi
rm -rf jar/*
cp $targetdir/$jar jar/
java -server -Xmx$projectmem -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+UseCompressedOops -XX:+UseCompressedClassPointers -verbose:gc -Xlog:gc*:logs/gc.log:time,l,tg:filecount=7,filesize=16M -jar jar/$jar --spring.profiles.active=$profile > run.log 2>&1