build: update release scripts to handle a remote master (#22707)

This commit is contained in:
Samuel Attard 2020-03-17 09:35:58 -07:00 committed by GitHub
parent a63e4ef378
commit 9583f7dabb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -82,7 +82,7 @@ async function getCurrentBranch (gitDir) {
'--remote' '--remote'
], gitDir)).split('\n') ], gitDir)).split('\n')
branch = branches.filter(b => b.trim() === 'master' || RELEASE_BRANCH_PATTERN.test(b.trim()))[0] branch = branches.filter(b => b.trim() === 'master' || b.trim() === 'origin/master' || RELEASE_BRANCH_PATTERN.test(b.trim()))[0]
if (!branch) { if (!branch) {
console.log(`${fail} no release branch exists for this ref`) console.log(`${fail} no release branch exists for this ref`)
process.exit(1) process.exit(1)