linux脚本:
#!/bin/sh rm -rf /home/tomcat/xiecang_hybird_web/xiecang_hybird_web.zip
rm -rf /home/tomcat/xiecang_hybird_web/update/*
cd /home/tomcat/xiecang_hybird_web/
echo 'untgz running' tar -xf package.tgz
sleep 3 echo 'un xiecang_hybird_web.zip running'
tar -xf xiecang_hybird_web.zip -C /home/tomcat/xiecang_hybird_web/update/
sleep 10
echo 'cordova-hcp running'
cd /home/tomcat/xiecang_hybird_web/update cordova platform add browser
sleep 3
/usr/local/node/bin/cordova-hcp build
sleep 1 cordova build browser
sleep 3 /home/tomcat/xiecang_hybird_web_config/createConfig.sh
rm -rf /usr/local/tomcat/webapps/xiecang_hot_update/* cp /home/tomcat/xiecang_hybird_web_config/dev3/chcp.json /usr/local/tomcat/webapps/xiecang_hot_update/ cd /home/tomcat/xiecang_hybird_web/update/platforms/browser/www/ cp -r css /usr/local/tomcat/webapps/xiecang_hot_update/
cp -r img /usr/local/tomcat/webapps/xiecang_hot_update/
cp -r js /usr/local/tomcat/webapps/xiecang_hot_update/
cp chcp.manifest /usr/local/tomcat/webapps/xiecang_hot_update/
cp -r fonts /usr/local/tomcat/webapps/xiecang_hot_update/
cp index.html /usr/local/tomcat/webapps/xiecang_hot_update/
cp -r lib /usr/local/tomcat/webapps/xiecang_hot_update/
cp -r templates /usr/local/tomcat/webapps/xiecang_hot_update/ rm -rf chcp.json cp /home/tomcat/xiecang_hybird_web_config/xiecang/chcp.json ./ t3=`date '+%Y.%m.%d-%H.%M.%S'`
zip -rq xiecang_hot_update_$t3.zip ./* echo 'success'
#!/bin/bash
rm -rf /home/tomcat/xie_hybird_web_config/dev3/chcp.json
t3=`date '+%Y.%m.%d-%H.%M.%S'` echo -e "{" >> /home/tomcat/xie_hybird_web_config/dev3/chcp.json
echo -e " \"autogenerated\": true," >> /home/tomcat/xie_hybird_web_config/dev3/chcp.json
echo -e " \"release\": \""$t3"\"," >> /home/tomcat/xie_hybird_web_config/dev3/chcp.json
echo -e " \"content_url\": \"http://dev3.abc.cn/xie_hot_update\"," >> /home/tomcat/xie_hybird_web_config/dev3/chcp.json
echo -e " \"update\": \"now\"" >> /home/tomcat/xie_hybird_web_config/dev3/chcp.json
echo -e "}" >> /home/tomcat/xie_hybird_web_config/dev3/chcp.json rm -rf /home/tomcat/xie_hybird_web_config/xie/chcp.json
echo -e "{" >> /home/tomcat/xie_hybird_web_config/xie/chcp.json
echo -e " \"autogenerated\": true," >> /home/tomcat/xie_hybird_web_config/xie/chcp.json
echo -e " \"release\": \""$t3"\"," >> /home/tomcat/xie_hybird_web_config/xie/chcp.json
echo -e " \"content_url\": \"http://www.bcd.com/xie_hot_update\"," >> /home/tomcat/xie_hybird_web_config/xie/chcp.json
echo -e " \"update\": \"now\"" >> /home/tomcat/xie_hybird_web_config/xie/chcp.json
echo -e "}" >> /home/tomcat/xie_hybird_web_config/xie/chcp.json echo "xie chcp success"
阿里云crp编辑打包脚本:
编译语言选择:其他
#!/bin/bash
mkdir target
tar -zcf ./target/xiecang_hybird_web.zip ./www ./bower.json ./config.xml ./cordova-hcp.json ./gulpfile.js ./hooks ./node_modules ./package.json ./plugins ./resources ./scss