fix getReleaseWithTool

This commit is contained in:
ekatek
2014-10-16 17:14:09 -07:00
parent 62e3c2c500
commit 7c7ee4366c

View File

@@ -646,6 +646,16 @@ _.extend(RemoteCatalog.prototype, {
return result[0];
},
// Get a release version with a given tool
getReleaseWithTool: function (toolSpec) {
var self = this;
// XXX: In the future, we should consider adding tool as a column and
// implementing table upgrades
var allVersions = self._queryAsJSON(
"SELECT content FROM releaseVersions");
return _.findWhere(allVersions, { tool: toolSpec });
},
// Used by make-bootstrap-tarballs. Only should be used on catalogs that are
// specially constructed for bootstrap tarballs.
forceRecommendRelease: function (track, version) {