mozilla-get-url
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -0,1 +1,4 @@ | ||
- 0.2.0 | ||
- add xullrunner support | ||
- 0.1.0 | ||
@@ -2,0 +5,0 @@ - allow any branch in preelease channel that maps to a valid path. |
@@ -5,6 +5,11 @@ var fsPath = require('path'), | ||
debug = require('debug')('mozilla-get-url:channel:release'); | ||
FTPFilter = require('../ftp_filter'); | ||
FTPFilter = require('../ftp_filter'), | ||
xulrunner = require('../productions/xulrunner'); | ||
function filter(options, list) { | ||
if (!list.length) return null; | ||
// XULRunner need special filter. | ||
if ('xulrunner' === options.product) | ||
return xulrunner.filter(options, list); | ||
return list[0].name; | ||
@@ -27,11 +32,19 @@ } | ||
// TODO: There should be a formal dispatcher to patch it by productions. | ||
// Some special, not matching path need some patches. | ||
// | ||
// construct a base url | ||
var path = urls.ftpPath( | ||
options.product, | ||
'releases', | ||
options.branch, | ||
options.os, | ||
options.language, | ||
'/' | ||
); | ||
var path = ""; | ||
if ('xulrunner' === options.product) { | ||
path = xulrunner.path(options, 'releases'); | ||
} else { | ||
path = urls.ftpPath( | ||
options.product, | ||
'releases', | ||
options.branch, | ||
options.os, | ||
options.language, | ||
'/' | ||
); | ||
} | ||
@@ -38,0 +51,0 @@ var ftpFilter = new FTPFilter(options); |
{ | ||
"name": "mozilla-get-url", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "Utility to get the url of a particular version/release of a mozilla product (like firefox/b2g)", | ||
@@ -5,0 +5,0 @@ "main": "lib/locate.js", |
18277
20
447