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 { prompt } = require('enquirer')
|
||||||
const execa = require('execa')
|
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 isDryRun = args.dry
|
||||||
const skipTests = args.skipTests
|
const skipTests = args.skipTests
|
||||||
const skipBuild = args.skipBuild
|
const skipBuild = args.skipBuild
|
||||||
@ -21,10 +23,7 @@ const versionIncrements = [
|
|||||||
'patch',
|
'patch',
|
||||||
'minor',
|
'minor',
|
||||||
'major',
|
'major',
|
||||||
'prepatch',
|
...(preId ? ['prepatch', 'preminor', 'premajor', 'prerelease'] : [])
|
||||||
'preminor',
|
|
||||||
'premajor',
|
|
||||||
'prerelease'
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const inc = i => semver.inc(currentVersion, i, preId)
|
const inc = i => semver.inc(currentVersion, i, preId)
|
||||||
|
Loading…
Reference in New Issue
Block a user