Skip to content
Permalink
Browse files
npm-flexjs: added configuration keys to allow nightly builds to be in…
…stalled with npm
  • Loading branch information
joshtynjala committed May 30, 2017
1 parent 511bdcb commit 233d8e9d5d0a9f945fda31849690821e7d7f703b
Showing 2 changed files with 51 additions and 20 deletions.
@@ -425,14 +425,29 @@ ApacheFalcon.falconInstallComplete = function()

ApacheFalcon.install = function()
{
request(constants.APACHE_MIRROR_RESOLVER_URL + pathToFalconBinary + fileNameFalconBinary + '?' + constants.REQUEST_JSON_PARAM, ApacheFalcon.handleFalconMirrorsResponse);
console.log('Downloading Apache Flex Falcon Compiler');
/*request
.get("http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon/lastSuccessfulBuild/artifact/out/apache-flex-falconjx-0.7.0-bin.zip")
.pipe(fs.createWriteStream(constants.DOWNLOADS_FOLDER + fileNameFalconBinary)
.on('finish', function(){
console.log('Apache Flex Falcon Compiler download complete');
ApacheFalcon.extract();
})
);*/
var isNightly = process.env.npm_package_config_nightly === "true";
if(isNightly)
{
var downloadURL = process.env.npm_package_config_falcon_nightly_url;
}
else
{
downloadURL = constants.APACHE_MIRROR_RESOLVER_URL + pathToFalconBinary + fileNameFalconBinary + '?' + constants.REQUEST_JSON_PARAM;
}
console.log('Downloading Apache Flex "Falcon" Compiler from ' + downloadURL);
if(isNightly)
{
request
.get(downloadURL)
.pipe(fs.createWriteStream(constants.DOWNLOADS_FOLDER + fileNameFalconBinary)
.on('finish', function(){
console.log('Apache Flex Falcon Compiler download complete');
ApacheFalcon.extract();
})
);
}
else
{
request(downloadURL, ApacheFalcon.handleFalconMirrorsResponse);
}
};
@@ -64,14 +64,30 @@ ApacheFlexJS.extract = function()

ApacheFlexJS.install = function()
{
request(constants.APACHE_MIRROR_RESOLVER_URL + pathToFlexJSBinary + fileNameFlexJSBinary + '?' + constants.REQUEST_JSON_PARAM, ApacheFlexJS.handleFlexJSMirrorsResponse);
console.log('Downloading Apache FlexJS');
/*request
.get("http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs/lastSuccessfulBuild/artifact/out/apache-flex-flexjs-0.7.0-bin.zip")
.pipe(fs.createWriteStream(constants.DOWNLOADS_FOLDER + fileNameFlexJSBinary)
.on('close', function(){
console.log('Apache FlexJS download complete');
ApacheFlexJS.extract();
})
);*/
//uncomment to test a nightly build
var isNightly = process.env.npm_package_config_nightly === "true";
if(isNightly)
{
var downloadURL = process.env.npm_package_config_flexjs_nightly_url;
}
else
{
downloadURL = constants.APACHE_MIRROR_RESOLVER_URL + pathToFlexJSBinary + fileNameFlexJSBinary + '?' + constants.REQUEST_JSON_PARAM;
}
console.log('Downloading Apache FlexJS from ' + downloadURL);
if(isNightly)
{
request
.get(downloadURL)
.pipe(fs.createWriteStream(constants.DOWNLOADS_FOLDER + fileNameFlexJSBinary)
.on('close', function(){
console.log('Apache FlexJS download complete');
ApacheFlexJS.extract();
})
);
}
else
{
request(downloadURL, ApacheFlexJS.handleFlexJSMirrorsResponse);
}
};

0 comments on commit 233d8e9

Please sign in to comment.