Skip to content

Commit

Permalink
Handle master snapshots better in duktape.js
Browse files Browse the repository at this point in the history
Treat e.g. 2.2.99 as 2.3.0 for testing purposes; it's built from master and
just before the release 2.2.99 should be treated as 2.3 (not 2.2) as far as
results are concerned.
  • Loading branch information
svaarala committed Oct 15, 2017
1 parent 860c969 commit c191b28
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions duktape.js
Expand Up @@ -26,6 +26,9 @@ var dukKey = (function () {
});
var dukVersion = Number(stdout);
console.log('Duktape version is: ' + dukVersion);
if ((dukVersion % 100) == 99) {
dukVersion++; // Treat e.g. 2.2.99 (built from master) as 2.3.0 for testing
}
return 'duktape' + (Math.floor(dukVersion / 10000)) + '_' + (Math.floor(dukVersion / 100 % 100));
})();
console.log('Duktape result key is: test.res.' + dukKey);
Expand Down

0 comments on commit c191b28

Please sign in to comment.