mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Bump very far --> this is electron bot fixing the release
This commit is contained in:
committed by
Samuel Attard
parent
25e5432863
commit
ff54817a92
@@ -39,12 +39,15 @@ async function getCurrentBranch (gitDir) {
|
||||
let branch = await handleGitCall(['rev-parse', '--abbrev-ref', 'HEAD'], gitDir)
|
||||
if (branch !== 'master' && !branch.match(/[0-9]+-[0-9]+-x/)) {
|
||||
const lastCommit = await handleGitCall(['rev-parse', 'HEAD'], gitDir)
|
||||
const branches = (await handleGitCall(['branch', '--contains', lastCommit], gitDir)).split('\n')
|
||||
const branches = (await handleGitCall(['branch', '--contains', lastCommit, '--remote'], gitDir)).split('\n')
|
||||
branch = branches.filter(b => b === 'master' || b.match(/[0-9]+-[0-9]+-x/))[0]
|
||||
if (!branch) {
|
||||
console.log(`${fail} no release branch exists for this ref`)
|
||||
process.exit(1)
|
||||
}
|
||||
if (branch.startsWith('origin/')) {
|
||||
branch = branch.substr('origin/'.length)
|
||||
}
|
||||
}
|
||||
return branch.trim()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user