cop-web/script/index.js

13 lines
418 B
JavaScript
Raw Permalink Normal View History

2024-11-12 06:32:03 +00:00
const exec = require('child_process').exec
const params = process.argv[2]
2024-03-14 03:36:22 +00:00
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) {
2024-11-12 06:32:03 +00:00
console.log('======执行失败=======')
2024-03-14 03:36:22 +00:00
console.log(err)
} else {
2024-11-12 06:32:03 +00:00
console.log('======执行成功=======')
console.log(stdout)
2024-03-14 03:36:22 +00:00
}
2024-11-12 06:32:03 +00:00
})