diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-09-04 18:58:16 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-09-04 18:58:16 +0200 |
commit | e0a3f0cea550d05dc0e4d2ce689fe58315f043ad (patch) | |
tree | 587a1315867c2835db4347ba90d3b18c05530d7c /lib/configuration.js | |
parent | 66727b2736cf260e33749e8104f7928e86a78f2d (diff) | |
download | gitbook-e0a3f0cea550d05dc0e4d2ce689fe58315f043ad.zip gitbook-e0a3f0cea550d05dc0e4d2ce689fe58315f043ad.tar.gz gitbook-e0a3f0cea550d05dc0e4d2ce689fe58315f043ad.tar.bz2 |
Add warning for too strict gitbook version
Diffstat (limited to 'lib/configuration.js')
-rw-r--r-- | lib/configuration.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/configuration.js b/lib/configuration.js index f510918..b7dccfe 100644 --- a/lib/configuration.js +++ b/lib/configuration.js @@ -121,8 +121,8 @@ Configuration.prototype.load = function() { if (!semver.satisfies(pkg.version, that.options.gitbook)) { throw "GitBook version doesn't satisfy version required by the book: "+that.options.gitbook; } - if (that.options.gitbook == "*") { - that.book.log.warn.ln("you should specify a gitbook version to use in your book.json, for example: "+(_.first(pkg.version.split("."))+".x.x")); + if (that.options.gitbook != '*' && !semver.satisfies(that.options.gitbook, semver.inc(pkg.version, 'patch'))) { + that.book.log.warn.ln("gitbook version specified in your book.json might be too strict for future patches, \""+(_.first(pkg.version.split("."))+".x.x")+"\" is more adequate"); } that.options.output = path.resolve(that.options.output || path.join(that.book.root, "_book")); |