构建脚本如下:
echo "当前目录":$(pwd)
echo "当前时间":$(date +%Y-%m-%d_%H:%M)
find ./ -type f -name 'application.yml' | xargs perl -pi -e 's|active: sit|active: uat|g'
mkdir BOOT-INF
mkdir BOOT-INF/classes
cp -rf mall_seller_parent/mall_seller_web/src/main/resources/application.yml BOOT-INF/classes/
jar -uf mall_seller_parent/mall_seller_web/target/mall_seller.jar BOOT-INF/classes/application.yml
mall_seller=svn://192.168.1.252/doc/版本发布/商城/mall_seller/$(date +%Y-%m-%d)/$(date +%H-%M)/mall_seller.jar
svn import /data/javaapp/test.txt svn://192.168.1.252/doc/版本发布/商城/mall_seller/$(date +%Y-%m-%d)/test$(date +%H-%M-%S).txt -m 用于创建目录
svn delete svn://192.168.1.252/doc/版本发布/商城/mall_seller/$(date +%Y-%m-%d) -m "删除今日备份"
svn import mall_seller_parent/mall_seller_web/target/mall_seller.jar $mall_seller -m 发布新版本测试包
cp -rf mall_operation_parent/mall_operation_web/src/main/resources/application.yml BOOT-INF/classes/
jar -uf mall_operation_parent/mall_operation_web/target/mall_operation.jar BOOT-INF/classes/application.yml
mall_operation=svn://192.168.1.252/doc/版本发布/商城/mall_operation/$(date +%Y-%m-%d)/$(date +%H-%M)/mall_operation.jar
svn import /data/javaapp/test.txt svn://192.168.1.252/doc/版本发布/商城/mall_operation/$(date +%Y-%m-%d)/test$(date +%H-%M-%S).txt -m 用于创建目录
svn delete svn://192.168.1.252/doc/版本发布/商城/mall_operation/$(date +%Y-%m-%d) -m "删除今日备份"
svn import mall_operation_parent/mall_operation_web/target/mall_operation.jar $mall_operation -m 发布新版本测试包
cp -rf mall_supplier_parent/mall_supplier_web/src/main/resources/application.yml BOOT-INF/classes/
jar -uf mall_supplier_parent/mall_supplier_web/target/mall_supplier.jar BOOT-INF/classes/application.yml
mall_supplier=svn://192.168.1.252/doc/版本发布/商城/mall_supplier/$(date +%Y-%m-%d)/$(date +%H-%M)/mall_supplier.jar
svn import /data/javaapp/test.txt svn://192.168.1.252/doc/版本发布/商城/mall_supplier/$(date +%Y-%m-%d)/test$(date +%H-%M-%S).txt -m 用于创建目录
svn delete svn://192.168.1.252/doc/版本发布/商城/mall_supplier/$(date +%Y-%m-%d) -m "删除今日备份"
svn import mall_supplier_parent/mall_supplier_web/target/mall_supplier.jar $mall_supplier -m 发布新版本测试包
cp -rf mall_shoppingmall_parent/mall_shoppingmall_web/src/main/resources/application.yml BOOT-INF/classes/
jar -uf mall_shoppingmall_parent/mall_shoppingmall_web/target/mall_shoppingmall.jar BOOT-INF/classes/application.yml
mall_shoppingmall=svn://192.168.1.252/doc/版本发布/商城/H5mall_shoppingmall/$(date +%Y-%m-%d)/$(date +%H-%M)/mall_shoppingmall.jar
svn import /data/javaapp/test.txt svn://192.168.1.252/doc/版本发布/商城/H5mall_shoppingmall/$(date +%Y-%m-%d)/test$(date +%H-%M-%S).txt -m 用于创建目录
svn delete svn://192.168.1.252/doc/版本发布/商城/H5mall_shoppingmall/$(date +%Y-%m-%d) -m "删除今日备份"
svn import mall_shoppingmall_parent/mall_shoppingmall_web/target/mall_shoppingmall.jar $mall_shoppingmall -m 发布新版本测试包
echo -e "svn上传路径为:::↓↓↓↓↓↓↓↓↓↓↓↓
$mall_seller
$mall_operation
$mall_supplier
$mall_shoppingmall"