fix(pre): correct type on initial release

This commit is contained in:
Christoph Witzko 2015-05-14 01:19:54 +02:00
parent 41c90124f6
commit f0f53f207b

View File

@ -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')