update tag script

This commit is contained in:
tangjinzhou 2018-07-27 21:42:45 +08:00
parent ad2ee7d175
commit 4a4396033d

View File

@ -137,8 +137,8 @@ function tag () {
execSync(`git config --global user.email ${process.env.GITHUB_USER_EMAIL}`) execSync(`git config --global user.email ${process.env.GITHUB_USER_EMAIL}`)
execSync(`git config --global user.name ${process.env.GITHUB_USER_NAME}`) execSync(`git config --global user.name ${process.env.GITHUB_USER_NAME}`)
execSync(`git tag ${version}`) execSync(`git tag ${version}`)
execSync(`git push origin ${version}:${version}`) execSync(`git push https://${process.env.GITHUB_TOKEN}@github.com/vueComponent/ant-design.git ${version}:${version}`)
execSync('git push origin master:master') execSync(`git push https://${process.env.GITHUB_TOKEN}@github.com/vueComponent/ant-design.git master:master`)
console.log('tagged') console.log('tagged')
} }
@ -186,6 +186,12 @@ function githubRelease (done) {
done() done()
}) })
} }
gulp.task('tag', (done) => {
tag()
githubRelease(done)
})
gulp.task('check-git', (done) => { gulp.task('check-git', (done) => {
runCmd('git', ['status', '--porcelain'], (code, result) => { runCmd('git', ['status', '--porcelain'], (code, result) => {
if (/^\?\?/m.test(result)) { if (/^\?\?/m.test(result)) {