UNPKG
@xccjh/git-pull
Version:
latest (1.0.4)
1.0.4
1.0.3
1.0.0
实现发版前拉取代码再打包,防止发版覆盖问题
@xccjh/git-pull
/
index.js
15 lines
(14 loc)
•
413 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module
.
exports
=
() =>
(
new
Promise
(
resolve
=>
(
require
(
"child_process"
).
exec
(
`git pull`
,
function
(
err, stdout, stderr
) {
if
(err) {
resolve
(
false
)
console
.
log
(stderr); }
else
{
console
.
log
(stdout)
console
.
log
(
'拉取代码成功!'
);
resolve
(
true
) } }) )) )