MCPcopy
hub / github.com/desktop/desktop / createReleaseBranch

Function createReleaseBranch

script/draft-release/run.ts:22–34  ·  view source on GitHub ↗
(version: string)

Source from the content-addressed store, hash-verified

20const changelogPath = join(__dirname, '..', '..', 'changelog.json')
21
22async function createReleaseBranch(version: string): Promise<void> {
23 try {
24 const versionBranch = `releases/${version}`
25 const currentBranch = (
26 await sh('git', 'rev-parse', '--abbrev-ref', 'HEAD')
27 ).trim()
28 if (currentBranch !== versionBranch) {
29 await sh('git', 'checkout', '-b', versionBranch)
30 }
31 } catch (error) {
32 console.log(`Failed to create release branch: ${error}`)
33 }
34}
35
36/** Converts a string to Channel type if possible */
37function parseChannel(arg: string): Channel {

Callers 1

runFunction · 0.85

Calls 2

shFunction · 0.90
logMethod · 0.45

Tested by

no test coverage detected