From f8861a5e28f56276d5fb197d3cf86c7e552214ef Mon Sep 17 00:00:00 2001 From: Brandy Carney Date: Wed, 6 Mar 2019 11:38:13 -0500 Subject: [PATCH] chore(release): update release script to check for release or hotfix branches --- .scripts/common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.scripts/common.js b/.scripts/common.js index 1a1302e1a7..eefc254ccc 100644 --- a/.scripts/common.js +++ b/.scripts/common.js @@ -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.`); } }) },