1 changed files with 98 additions and 0 deletions
@ -0,0 +1,98 @@ |
|||
#!/bin/bash |
|||
#set -x |
|||
set -e |
|||
|
|||
echoPrefix="\033[36m+" |
|||
echoSuffix="\033[0m" |
|||
|
|||
codePath=/home/www/deploy/wms8_pre |
|||
|
|||
# 进入代码文件夹 |
|||
echo -e "$echoPrefix cd $codePath $echoSuffix" |
|||
cd $codePath |
|||
|
|||
# 更新代码 |
|||
echo -e "$echoPrefix git checkout . $echoSuffix" |
|||
git checkout . |
|||
echo -e "$echoPrefix git pull $echoSuffix" |
|||
git pull |
|||
|
|||
# 编译 |
|||
echo -e "$echoPrefix cd $codePath/wms-biz/pda-client/ $echoSuffix" |
|||
cd $codePath/wms-biz/pda-client/ |
|||
echo -e "$echoPrefix yarn build $echoSuffix" |
|||
yarn build |
|||
|
|||
# 创建打包文件夹 |
|||
echo -e "$echoPrefix rm -rf $codePath/tmp $echoSuffix" |
|||
#rm -rf $codePath/tmp |
|||
|
|||
echo -e "$echoPrefix mkdir -p $codePath/tmp/web/static $echoSuffix" |
|||
mkdir -p $codePath/tmp/web/static |
|||
|
|||
echo -e "$echoPrefix mkdir -p $codePath/tmp/web/node_modules/tslib $echoSuffix" |
|||
mkdir -p $codePath/tmp/web/node_modules/tslib |
|||
|
|||
echo -e "$echoPrefix mkdir -p $codePath/tmp/web/m_node_modules/yvan-ext-mobile $echoSuffix" |
|||
mkdir -p $codePath/tmp/web/m_node_modules/yvan-ext-mobile |
|||
|
|||
echo -e "$echoPrefix mkdir -p $codePath/tmp/web/mobile-assets $echoSuffix" |
|||
mkdir -p $codePath/tmp/web/mobile-assets |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/dist_pda/ $codePath/tmp/web/dist_pda $echoSuffix" |
|||
cp -r $codePath/dist_pda/ $codePath/tmp/web/dist_pda |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/static/require.js $codePath/tmp/web/static/require.js $echoSuffix" |
|||
cp -r $codePath/public/static/require.js $codePath/tmp/web/static/require.js |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/m_require_config.js $codePath/tmp/web/m_require_config.js $echoSuffix" |
|||
cp -r $codePath/public/m_require_config.js $codePath/tmp/web/m_require_config.js |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/m_common.css $codePath/tmp/web/m_common.css $echoSuffix" |
|||
cp -r $codePath/public/m_common.css $codePath/tmp/web/m_common.css |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/m.html $codePath/tmp/web/index.html $echoSuffix" |
|||
cp -r $codePath/public/m.html $codePath/tmp/web/index.html |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/static/require-css $codePath/tmp/web/static/require-css $echoSuffix" |
|||
cp -r $codePath/public/static/require-css $codePath/tmp/web/static/require-css |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/static/polyfill $codePath/tmp/web/static/polyfill $echoSuffix" |
|||
cp -r $codePath/ $codePath/tmp/ |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/static/jquery $codePath/tmp/web/static/jquery $echoSuffix" |
|||
cp -r $codePath/public/static/jquery $codePath/tmp/web/static/jquery |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/static/font-awesome $codePath/tmp/web/static/font-awesome $echoSuffix" |
|||
cp -r $codePath/public/static/font-awesome $codePath/tmp/web/static/font-awesome |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/static/iconfont $codePath/tmp/web/static/iconfont $echoSuffix" |
|||
cp -r $codePath/public/static/font-awesome $codePath/tmp/web/static/font-awesome |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/public/static/bootstrap $codePath/tmp/web/static/bootstrap $echoSuffix" |
|||
cp -r $codePath/public/static/bootstrap $codePath/tmp/web/static/bootstrap |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/wms-biz/pda-client/node_modules/tslib/tslib.js $codePath/tmp/web/node_modules/tslib/tslib.js $echoSuffix" |
|||
cp -r $codePath/wms-biz/pda-client/node_modules/tslib/tslib.js $codePath/tmp/web/node_modules/tslib/tslib.js |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/wms-biz/pda-client/node_modules/yvan-ext-mobile/dist $codePath/tmp/web/m_node_modules/yvan-ext-mobile/dist $echoSuffix" |
|||
cp -r $codePath/wms-biz/pda-client/node_modules/yvan-ext-mobile/dist $codePath/tmp/web/m_node_modules/yvan-ext-mobile/dist |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/wms-biz/pda-client/node_modules/yvan-ext-mobile/assets/ext-7.4/packages $codePath/tmp/web/mobile-assets/packages $echoSuffix" |
|||
cp -r $codePath/wms-biz/pda-client/node_modules/yvan-ext-mobile/assets/ext-7.4/packages $codePath/tmp/web/mobile-assets/packages |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/wms-biz/pda-client/node_modules/yvan-ext-mobile/assets/ext-7.4/modern $codePath/tmp/web/mobile-assets/modern $echoSuffix" |
|||
cp -r $codePath/wms-biz/pda-client/node_modules/yvan-ext-mobile/assets/ext-7.4/modern $codePath/tmp/web/mobile-assets/modern |
|||
|
|||
echo -e "$echoPrefix cp -r $codePath/wms-biz/pda-client/node_modules/yvan-ext-mobile/assets/ext-7.4/ext-modern-all-debug.js $codePath/tmp/web/mobile-assets/ext-modern-all-debug.js $echoSuffix" |
|||
cp -r $codePath/wms-biz/pda-client/node_modules/yvan-ext-mobile/assets/ext-7.4/ext-modern-all-debug.js $codePath/tmp/web/mobile-assets/ext-modern-all-debug.js |
|||
|
|||
echo -e "$echoPrefix cd $codePath/tmp $echoSuffix" |
|||
cd $codePath/tmp |
|||
echo -e "$echoPrefix zip -r web.zip web $echoSuffix" |
|||
zip -r web.zip web |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Loading…
Reference in new issue