1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
module_name="promotion-api"
package_base="/home/zdmprd/DeployTools/package"
package_path=$package_base/$module_name
cd ${env_workspace}
mvn package -Dmaven.test.skip=true
# 如果master上存放的构建后项目目录结构的文件夹不存在则创建它
if [ ! -d $package_path ];then
cp -r $package_base/template/ $package_path
fi
rsync -avz $module_name/target/lib $package_path
rsync -avz $module_name/target/classes/config $package_path
rsync -avx $module_name/target/*.jar $package_path
cd $package_path
tar -zcvf ${env_pack_file} *
|