fix(pre): correct type on initial release
This commit is contained in:
parent
41c90124f6
commit
f0f53f207b
@ -21,7 +21,12 @@ module.exports = function (options, plugins, cb) {
|
||||
|
||||
if (!type) return cb(null, null)
|
||||
|
||||
pkg.version = res.version ? semver.inc(res.version, type) : '1.0.0'
|
||||
if (res.version) {
|
||||
pkg.version = semver.inc(res.version, type)
|
||||
} else {
|
||||
type = 'major'
|
||||
pkg.version = '1.0.0'
|
||||
}
|
||||
|
||||
var writePkg = function () {
|
||||
if (!options.debug) fs.writeFileSync(path, JSON.stringify(pkg, null, 2) + '\n')
|
||||
|
Loading…
x
Reference in New Issue
Block a user