Skip to content

Commit

Permalink
Make the github release detection more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
bjpirt committed Jun 25, 2015
1 parent 59a460f commit f5cf5e5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions app/lib/githubVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ GithubVersion.prototype.fetchLatestRelease = function(cb){
var res = JSON.parse(body);
for(var i=0; i< res.length; i++){
if(self.usePrereleases || !res[i].prerelease){
self.latest = JSON.parse(body)[i];
self.version = self.latest.tag_name;
cb();
break;
var assets = res[i].assets.map(function(e){ return e.name; });
if(assets.indexOf(self.file) >= 0){
self.latest = res[i];
self.version = self.latest.tag_name;
cb();
break;
}
}
}
}else{
Expand Down

0 comments on commit f5cf5e5

Please sign in to comment.