Initial commit
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
import semver from 'semver';
|
||||
|
||||
export function getNextTarget (runtime, targets) {
|
||||
const latest = targets.filter((t) => { return t.runtime === runtime }).slice(-1)[0]
|
||||
const increment = runtime === 'electron' ? 'minor' : 'major'
|
||||
let next = semver.inc(latest.target, increment)
|
||||
// Electron releases appear in the registry in their beta form, sometimes there is
|
||||
// no active beta line. During this time we need to double bump
|
||||
if (runtime === 'electron' && semver.parse(latest.target).prerelease.length) {
|
||||
next = semver.inc(next, 'major')
|
||||
}
|
||||
return next
|
||||
}
|
||||
Reference in New Issue
Block a user