|
|
@ -77,12 +77,27 @@ source_build() { |
|
|
echo -e "$echoPrefix gradle build -x test $echoSuffix" |
|
|
echo -e "$echoPrefix gradle build -x test $echoSuffix" |
|
|
gradle build -x test |
|
|
gradle build -x test |
|
|
echo "" |
|
|
echo "" |
|
|
|
|
|
|
|
|
|
|
|
# 构建 yvan-ui |
|
|
|
|
|
echo -e "$echoPrefix cd $source_path/yvan-ui $echoSuffix" |
|
|
|
|
|
cd $source_path/yvan-ui |
|
|
|
|
|
echo -e "$echoPrefix yarn run build_only $echoSuffix" |
|
|
|
|
|
yarn run build_only |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
target_pull() { |
|
|
target_pull() { |
|
|
pullCode $target_path ${target_git} ${target_branch} ${target_position} |
|
|
pullCode $target_path ${target_git} ${target_branch} ${target_position} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
target_build() { |
|
|
|
|
|
# 构建 java |
|
|
|
|
|
echo -e "$echoPrefix cd $target_path $echoSuffix" |
|
|
|
|
|
cd $target_path |
|
|
|
|
|
echo -e "$echoPrefix gradle build -x test $echoSuffix" |
|
|
|
|
|
gradle build -x test |
|
|
|
|
|
echo "" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
sync_files() { |
|
|
sync_files() { |
|
|
echo -e "$echoPrefix 开始同步: $source_path $echoSuffix" |
|
|
echo -e "$echoPrefix 开始同步: $source_path $echoSuffix" |
|
|
rsync -azr --progress --delete \ |
|
|
rsync -azr --progress --delete \ |
|
|
@ -140,15 +155,36 @@ sync_files() { |
|
|
echo -e "$echoPrefix 同步完成 $echoSuffix" |
|
|
echo -e "$echoPrefix 同步完成 $echoSuffix" |
|
|
|
|
|
|
|
|
echo -e "$echoPrefix 开始同步 lib $echoSuffix" |
|
|
echo -e "$echoPrefix 开始同步 lib $echoSuffix" |
|
|
rsync -azr --progress --include '/yvan-*' --include '/wms-core-*' --include '/wms-api-*' --exclude='*' $source_path/wms-modules/wms-system/build/libs/lib/ $target_path/libs |
|
|
rsync -azr --progress \ |
|
|
|
|
|
--include '/yvan-*' \ |
|
|
|
|
|
--include '/wms-core-*' \ |
|
|
|
|
|
--include '/wms-api-*' \ |
|
|
|
|
|
--exclude='*' \ |
|
|
|
|
|
$source_path/wms-modules/wms-system/build/libs/lib/ $target_path/libs |
|
|
|
|
|
echo -e "$echoPrefix 同步完成 $echoSuffix" |
|
|
|
|
|
|
|
|
|
|
|
echo -e "$echoPrefix 开始同步 yvan-ui $echoSuffix" |
|
|
|
|
|
rsync -azr --progress --delete $source_path/yvan-ui/dist/ $target_path/yvan-ui-dist/dist |
|
|
echo -e "$echoPrefix 同步完成 $echoSuffix" |
|
|
echo -e "$echoPrefix 同步完成 $echoSuffix" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
commit_target() { |
|
|
|
|
|
echo -e "$echoPrefix cd $target_path $echoSuffix" |
|
|
|
|
|
cd $target_path |
|
|
|
|
|
echo -e "$echoPrefix git add . $echoSuffix" |
|
|
|
|
|
git add . |
|
|
|
|
|
echo -e "$echoPrefix git commit -m '代码同步' $echoSuffix" |
|
|
|
|
|
git commit -m '代码同步' |
|
|
|
|
|
echo -e "$echoPrefix git push origin $target_branch $echoSuffix" |
|
|
|
|
|
git push origin $target_branch |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
source_pull |
|
|
source_pull |
|
|
#source_build |
|
|
source_build |
|
|
target_pull |
|
|
target_pull |
|
|
sync_files |
|
|
sync_files |
|
|
|
|
|
commit_target |
|
|
|
|
|
target_build |
|
|
|
|
|
|
|
|
# bash <(curl -s http://git.yvanui.com/lizhiwei/jztd-deploy/raw/master/dsl/001sync_code.sh) |
|
|
# bash <(curl -s http://git.yvanui.com/lizhiwei/jztd-deploy/raw/master/dsl/001sync_code.sh) |
|
|
|
|
|
|
|
|
|