mozilla-get-url
Advanced tools
Comparing version 0.1.0-alpha to 0.1.0
@@ -0,2 +1,6 @@ | ||
- 0.1.0 | ||
- allow any branch in preelease channel that maps to a valid path. | ||
- add try server support with the try channel. | ||
- 0.0.1 | ||
- public release |
@@ -23,13 +23,15 @@ var fsPath = require('path'), | ||
function locate(options, callback) { | ||
if (!BRANCH_MAPPING[options.branch]) { | ||
throw new Error( | ||
'must pass valid branch: ' + | ||
Object.keys(BRANCH_MAPPING).join(', ') | ||
); | ||
} | ||
// we have some special cases for common names | ||
// for firefox. We also allow the direct path to the folder for uncommon cases | ||
// like the weird stuff in b2g. | ||
var branch = BRANCH_MAPPING[options.branch] || options.branch; | ||
// default branch is nightly | ||
if (!branch) branch = BRANCH_MAPPING.nightly; | ||
// construct a base url | ||
var path = urls.ftpPath( | ||
options.product, | ||
BRANCH_MAPPING[options.branch], | ||
branch, | ||
'/' | ||
@@ -36,0 +38,0 @@ ); |
@@ -1,4 +0,2 @@ | ||
var fsPath = require('path'), | ||
urls = require('../urls'), | ||
handleOpts = require('../options'), | ||
var urls = require('../urls'), | ||
buildFilter = require('../tinderbox_build_filter'), | ||
@@ -5,0 +3,0 @@ binaryFilter = require('../prerelease_filter'), |
{ | ||
"name": "mozilla-get-url", | ||
"version": "0.1.0-alpha", | ||
"version": "0.1.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", |
15818
366