fix: git ci error

This commit is contained in:
tanjinzhou 2019-07-24 19:24:16 +08:00
parent 80ebc2840a
commit 7b3897305b

View File

@ -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 {