mirror of
https://github.com/desktop/desktop
synced 2024-09-19 08:02:22 +00:00
tags are hard
This commit is contained in:
parent
d0c5be50cb
commit
b39015ac97
|
@ -53,16 +53,15 @@ export async function run(args: ReadonlyArray<string>): Promise<void> {
|
|||
)
|
||||
} else if (channel === 'beta') {
|
||||
const latestVersion = await getLatestRelease(false)
|
||||
const isBetaRelease = latestVersion.indexOf('-beta') > -1
|
||||
if (isBetaRelease) {
|
||||
const betaNumber = latestVersion.substr(latestVersion.length - 2)
|
||||
const betaTagIndex = latestVersion.indexOf('-beta')
|
||||
if (betaTagIndex > -1) {
|
||||
const betaNumber = latestVersion.substr(betaTagIndex + 5)
|
||||
const newBeta = parseInt(betaNumber, 10) + 1
|
||||
throw new Error(
|
||||
`Drafting a beta release from ${latestVersion} which will be a new beta ${newBeta}`
|
||||
)
|
||||
} else {
|
||||
const betaNumber = latestVersion.substr(latestVersion.length - 2)
|
||||
const newBeta = parseInt(betaNumber, 10) + 1
|
||||
const newBeta = 1
|
||||
throw new Error(
|
||||
`Drafting a beta release from ${latestVersion} which will be the first beta ${newBeta}`
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue