Skip to content
This repository has been archived by the owner on Jun 4, 2020. It is now read-only.

Commit

Permalink
Order revisions by build directory time, not build file time
Browse files Browse the repository at this point in the history
Helps with #8.
See also #46.
  • Loading branch information
maxg committed Jan 16, 2017
1 parent 308beab commit c4f1b8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ exports.findBuilds = function(spec, callback) {
return;
}
let revs = files.map(function(file) {
return { rev: file.split(path.sep)[0], ctime: fs.statSync(path.join(dir, file)).ctime.getTime() };
let rev = file.split(path.sep)[0];
return { rev, ctime: fs.statSync(path.join(dir, rev)).ctime.getTime() };
}).sort(function(a, b) {
return b.ctime - a.ctime;
}).map(function(data) {
Expand Down

0 comments on commit c4f1b8c

Please sign in to comment.