cop-web/script/index.js

13 lines
424 B
JavaScript
Raw Normal View History

2024-03-14 03:36:22 +00:00
const exec = require('child_process').exec;
const params = process.argv[2];
const str = `git subtree ${params || 'pull'} --prefix=src/common http://haijun@58.210.154.140:8888/web/cmp-common.git master --squash`
exec(str, function (err, stdout, stderr) {
if (err) {
console.log('======执行失败=======');
console.log(err)
} else {
console.log('======执行成功=======');
console.log(stdout);
}
});