diff --git a/CHANGELOG.md b/CHANGELOG.md index d4f64946..0cf342aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ +## 0.1.7 +Released on 2017-08-10. +- Chaining the promises upto `compare` method and gracefully exiting application [#88](https://github.com/Azure/openapi-diff/issues/88) + ## 0.1.x Released on 2017-07-18. All issues associated with this release can be found using this filter [Sprint-103](https://github.com/Azure/openapi-diff/issues?q=label%3ASprint-103+is%3Aclosed) [Sprint-104](https://github.com/Azure/openapi-diff/issues?utf8=%E2%9C%93&q=label%3ASprint-104%20is%3Aclosed) #### Added - Initial release of oad. - - Added by [Vishrut Shah](https://github.com/vishrutshah). \ No newline at end of file + - Added by [Vishrut Shah](https://github.com/vishrutshah). diff --git a/README.md b/README.md index e09aa851..cf246251 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ### How to install ``` -npm install -g oad@0.1.6 +npm install -g oad@0.1.7 ``` ### Command Usage diff --git a/lib/commands/oad.js b/lib/commands/oad.js index 87f57ae8..db0f79d4 100644 --- a/lib/commands/oad.js +++ b/lib/commands/oad.js @@ -27,7 +27,12 @@ exports.handler = function (argv) { vOptions.logFilepath = argv.f; vOptions.json = argv.j; - return validate.compare(oldSpec, newSpec, vOptions); + return validate.compare(oldSpec, newSpec, vOptions).then((result) => { + console.log(result); + }).catch(err => { + console.log(err); + process.exitCode = 1; + }); } exports = module.exports; diff --git a/lib/validators/openApiDiff.js b/lib/validators/openApiDiff.js index 32dd09e8..6d9b021c 100644 --- a/lib/validators/openApiDiff.js +++ b/lib/validators/openApiDiff.js @@ -60,12 +60,7 @@ class OpenApiDiff { var promise2 = self.processViaAutoRest(newSwagger, 'new'); return Promise.all([promise1, promise2]).then(results => { - return self.processViaOpenApiDiff(results[0], results[1]).then((result, error) => { - console.log(result); - }) - }).catch(err => { - console.log(err); - process.exit(1); + return self.processViaOpenApiDiff(results[0], results[1]); }); } diff --git a/package.json b/package.json index 85c9162f..00faa5e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oad", - "version": "0.1.6", + "version": "0.1.7", "author": { "name": "Microsoft Corporation", "email": "azsdkteam@microsoft.com",