fix: git ci error

pull/1021/head
tanjinzhou 2019-07-24 19:24:16 +08:00
parent 80ebc2840a
commit 7b3897305b
1 changed files with 3 additions and 4 deletions

View File

@ -321,12 +321,12 @@ gulp.task(
owner, owner,
repo, repo,
}); });
const getCommits = github.repos.getCommits({ const listCommits = github.repos.listCommits({
owner, owner,
repo, repo,
per_page: 1, per_page: 1,
}); });
Promise.all([getLatestRelease, getCommits]).then(([latestRelease, commits]) => { Promise.all([getLatestRelease, listCommits]).then(([latestRelease, commits]) => {
const preVersion = latestRelease.data.tag_name; const preVersion = latestRelease.data.tag_name;
const { version } = packageJson; const { version } = packageJson;
const [_, newVersion] = commits.data[0].commit.message.trim().match(/bump (.+)/) || []; // eslint-disable-line const [_, newVersion] = commits.data[0].commit.message.trim().match(/bump (.+)/) || []; // eslint-disable-line
@ -335,8 +335,7 @@ gulp.task(
newVersion && newVersion &&
newVersion.trim() === version newVersion.trim() === version
) { ) {
gulp.run('pub', err => { runCmd('npm', ['pub'], code => {
err && console.log('err', err);
done(); done();
}); });
} else { } else {