return svn.add(path.join(__dirname, config.svn.copyPath), {force: true}, function(err, data) { if(!err) { svn.commit(path.join(__dirname, config.svn.copyPath), { "m": config.svn.comment || 'commit new content' }, function(err) { if(!err) { util.log(util.colors.green("提交svn成功")); } else { util.log(util.colors.red("提交文件失败,请手动提交")); } }) } else { util.log(util.colors.red("添加文件失败,请手动提交")); } });
return svn.add([pathConfig.slice, pathConfig.css, pathConfig.img, pathConfig.html], {force: true}, function(err, data) { if(!err) { svn.commit([pathConfig.slice, pathConfig.css, pathConfig.img, pathConfig.html], { "m": config.svn.comment || 'commit new content' }, function(err) { if(!err) { util.log(util.colors.green("提交构建稿svn成功")); } else { util.log(util.colors.red("提交构建稿文件失败,请手动提交")); } svn.cleanup("./",{}, cb); }) } else { util.log(util.colors.red("添加构建稿文件失败,请手动提交")); } });