chore: fix beta bumping in 3.0 (#14173)

This commit is contained in:
Samuel Attard 2018-08-17 13:00:04 -07:00 committed by GitHub
parent 2ecdf4a0eb
commit 0f937c2300
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

7
.env.example Normal file
View file

@ -0,0 +1,7 @@
# These env vars are only necessary for creating Electron releases.
# See docs/development/releasing.md
APPVEYOR_TOKEN=
CIRCLE_TOKEN=
ELECTRON_GITHUB_TOKEN=
VSTS_TOKEN=

View file

@ -342,7 +342,7 @@ def get_next_beta(v):
return make_version(pv[0] , pv[1], pv[2], 'beta.1')
lv = parse_version(tag_list[-1])
return make_version(lv[0] , lv[1], lv[2], str(int(lv[3]) + 1))
return make_version(pv[0], pv[1], pv[2], 'beta.' + str(int(lv[3]) + 1))
def get_next_stable_from_pre(v):
pv = clean_parse_version(v)

View file

@ -33,10 +33,7 @@ github.authenticate({type: 'token', token: process.env.ELECTRON_GITHUB_TOKEN})
async function getNewVersion (dryRun) {
console.log(`Bumping for new "${versionType}" version.`)
let bumpScript = path.join(__dirname, 'bump-version.py')
let scriptArgs = [bumpScript]
if (args.bump) {
scriptArgs.push(`--bump ${versionType}`)
}
let scriptArgs = [bumpScript, '--bump', versionType]
if (args.stable) {
scriptArgs.push('--stable')
}