1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- svnpath=svn://dev.webdev.ouj.com/pub/wxgame/allstar
- svntemp=./temp/pubsvn
- taskurl='http://webdev.ouj.com/index.php?r=deploy/index&task_id=122'
- respath=./build/wechatgame/res
- subpath=./allstarSubGame
- echo '****** 正在拉取最新 ******'
- git pull
- echo '****** 安装npm依赖 ******'
- npm install
- echo '****** 正在构建主域 ******'
- npm run build
- echo '****** 成功构建主域 ******'
- echo '...'
- echo '...'
- echo '****** 正在构建子域 ******'
- cd ${subpath} && npm run build
- echo '****** 成功构建子域 ******'
- cd ../
- echo '****** 正在压缩图片 ******'
- pngquant --quality=60-70 -vf --ext .png ./build/wechatgame/res/raw-assets/**/*.png
- echo '****** 正在从svn checkout内容 ******'
- svn checkout ${svnpath} ${svntemp}
- echo '****** 复制res目录到svn仓库对应位置 ******'
- cp -rf ./build/wechatgame/res ${svntemp}
- echo '****** 正在提交svn ******'
- cd ${svntemp} && svn cleanup && svn st | awk '{if ( $1 == "?") { print $2}}' | xargs svn add && svn commit -m ''
- echo '****** 清理临时svn目录 ******'
- cd ../../ && rm -rf ${svntemp}
- echo '****** 正在打开代码发布系统 ******'
- open ${taskurl}
- rm -rf ${respath}
- echo '...'
- echo '...'
|