Skip to content

Commit

Permalink
Fail Breaking Changes CI on exception (#2500)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlad Barosan authored Feb 15, 2018
1 parent 64683a5 commit 29c68f3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/breaking-change.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var utils = require('../test/util/utils'),
execSync = require('child_process').execSync,
oad = require('oad');

// This map is used to store the mapping between files resolved and stored location
// This map is used to store the mapping between files resolved and stored location
var resolvedMapForNewSpecs = {};
let outputFolder = path.join(os.tmpdir(), "resolved");
// Used to enable running script outside TravisCI for debugging
Expand Down Expand Up @@ -46,6 +46,7 @@ function runOad(oldSpec, newSpec) {
return Promise.resolve();
}).catch(err => {
console.log(err);
process.exitCode = 1;
});
}

Expand All @@ -71,7 +72,7 @@ function processViaAutoRest(swaggerPath) {
let result = execSync(`${autoRestCmd}`, { encoding: 'utf8', maxBuffer: 1024 * 1024 * 64 });
resolvedMapForNewSpecs[outputFileNameWithExt] = path.join(outputFolder, outputFileNameWithExt);
} catch (err) {
// Do not update map in case of errors
// Do not update map in case of errors.
}

return Promise.resolve();
Expand Down

0 comments on commit 29c68f3

Please sign in to comment.