From 7b3897305bbecefced568e3be0ed850e9807b8a4 Mon Sep 17 00:00:00 2001 From: tanjinzhou <415800467@qq.com> Date: Wed, 24 Jul 2019 19:24:16 +0800 Subject: [PATCH] fix: git ci error --- antd-tools/gulpfile.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/antd-tools/gulpfile.js b/antd-tools/gulpfile.js index b832a735b..d9eedbaf7 100644 --- a/antd-tools/gulpfile.js +++ b/antd-tools/gulpfile.js @@ -321,12 +321,12 @@ gulp.task( owner, repo, }); - const getCommits = github.repos.getCommits({ + const listCommits = github.repos.listCommits({ owner, repo, per_page: 1, }); - Promise.all([getLatestRelease, getCommits]).then(([latestRelease, commits]) => { + Promise.all([getLatestRelease, listCommits]).then(([latestRelease, commits]) => { const preVersion = latestRelease.data.tag_name; const { version } = packageJson; const [_, newVersion] = commits.data[0].commit.message.trim().match(/bump (.+)/) || []; // eslint-disable-line @@ -335,8 +335,7 @@ gulp.task( newVersion && newVersion.trim() === version ) { - gulp.run('pub', err => { - err && console.log('err', err); + runCmd('npm', ['pub'], code => { done(); }); } else {