/** * 系统命令替换版本号,并且提交git仓库 * @param odlVersion * @param newVersion */
function actionCommand(odlVersion,newVersion) {
var exec = require('child_process').exec;
var sedCmd = "sed -i '' 's/" + odlVersion + '/' + newVersion + "/g' package.json"
exec(sedCmd);
var gitCmd = 'git pull && git add package.json && git commit -m "版本打包更新" && git push';
exec(gitCmd);
}