forked from GCS-ZHN/AutoCard
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
21 lines (21 loc) · 656 Bytes
/
build.sh
File metadata and controls
21 lines (21 loc) · 656 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
appName="autocard"
mvn clean package spring-boot:repackage
if [ ! -d "release" ];then
mkdir release
fi
version=`ls target/autocard-*.jar|sed -r "s/target\/autocard-(.+?).jar/\1/g"`
targetDir="release/$appName-$version"
if [ -d $targetDir ];then
rm -rf $targetDir
fi
if [ -f "$targetDir.zip" ];then
rm -f "$targetDir.zip"
fi
mkdir $targetDir
cp target/autocard-$version.jar $targetDir
cp templete/shutdown.sh.temp $targetDir/shutdown.sh
cp templete/startup.sh.temp $targetDir/startup.sh
cp -R config $targetDir/config
cat templete/startup.sh.temp|sed -r "s/VERSION/$version/g" > $targetDir/startup.sh
zip -r $targetDir.zip $targetDir