chore(release): update release script to check for release or hotfix branches

This commit is contained in:
Brandy Carney
2019-03-06 11:38:13 -05:00
parent 98a8c88479
commit f8861a5e28

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('hofix') === -1) {
throw new Error(`Must be on a "release" or "hotfix" branch.`);
}
})
},