workflow: adjust release script for non-pre-releases
This commit is contained in:
parent
9664267793
commit
2ee2f945a6
@ -7,7 +7,9 @@ const currentVersion = require('../package.json').version
|
||||
const { prompt } = require('enquirer')
|
||||
const execa = require('execa')
|
||||
|
||||
const preId = args.preid || semver.prerelease(currentVersion)[0] || 'alpha'
|
||||
const preId =
|
||||
args.preid ||
|
||||
(semver.prerelease(currentVersion) && semver.prerelease(currentVersion)[0])
|
||||
const isDryRun = args.dry
|
||||
const skipTests = args.skipTests
|
||||
const skipBuild = args.skipBuild
|
||||
@ -21,10 +23,7 @@ const versionIncrements = [
|
||||
'patch',
|
||||
'minor',
|
||||
'major',
|
||||
'prepatch',
|
||||
'preminor',
|
||||
'premajor',
|
||||
'prerelease'
|
||||
...(preId ? ['prepatch', 'preminor', 'premajor', 'prerelease'] : [])
|
||||
]
|
||||
|
||||
const inc = i => semver.inc(currentVersion, i, preId)
|
||||
|
Loading…
Reference in New Issue
Block a user