Skip to content

Commit

Permalink
add urlTypePrefix
Browse files Browse the repository at this point in the history
Node-ChakraCore produces builds of type 'nightly' and uploads them to
a directory named 'chakracore-nightly'. This adds support for a prefix
that can be set to 'chakracore-'.
  • Loading branch information
joaocgreis committed Jun 13, 2017
1 parent d7cfd74 commit d0038de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion list-builds.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const indexUrl = 'https://nodejs.org/download/{type}/index.json'


function listBuilds (type, config, callback) {
let url = indexUrl.replace(/\{type\}/, type)
let url = indexUrl.replace(/\{type\}/, `${config.urlTypePrefix || ''}${type}`)

function onGet (err, data) {
if (err)
Expand Down
2 changes: 2 additions & 0 deletions nightly-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const argv = require('minimist')(process.argv.slice(2))
githubOrg : 'nodejs'
, githubRepo : 'node'
, githubScheme : 'https://github.com/'
, urlTypePrefix : ''
}

if (typeof argv.type != 'string')
Expand All @@ -35,6 +36,7 @@ if (!/^(nightly|v8-canary)$/.test(argv.type)
|| typeof config.githubRepo != 'string'
|| typeof config.githubOrg != 'string'
|| typeof config.githubScheme != 'string'
|| typeof config.urlTypePrefix != 'string'
) {

console.error('Invalid arguments or config')
Expand Down

0 comments on commit d0038de

Please sign in to comment.