chore(): update release scripts (#18157)

This commit is contained in:
Liam DeBeasi 2019-04-26 16:50:41 -04:00 committed by GitHub
parent c6bd7be763
commit 6850853908
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -37,8 +37,8 @@ function checkGit(tasks) {
{
title: 'Check current branch',
task: () => execa.stdout('git', ['symbolic-ref', '--short', 'HEAD']).then(branch => {
if (branch !== 'master') {
throw new Error(`Not on "master" branch`);
if (branch.indexOf('release') === -1 && branch.indexOf('hotfix') === -1) {
throw new Error(`Must be on a "release" or "hotfix" branch.`);
}
})
},