Skip to content
Permalink
Browse files
npm-flexjs: simplified the way that custom download URLs may be used …
…for nightlies
  • Loading branch information
joshtynjala committed May 30, 2017
1 parent 86a18ec commit 4d898afa7d1fa020a5b6dff191205cd9e3b13823
Showing 3 changed files with 19 additions and 15 deletions.
@@ -434,17 +434,22 @@ ApacheFalcon.falconInstallComplete = function()

ApacheFalcon.install = function()
{
var isNightly = process.env.npm_package_config_nightly === "true";
if(isNightly)
{
var downloadURL = process.env.npm_package_config_falcon_nightly_url;
//to test with a nightly build or another custom URL, run the following
//command with your custom URL
//npm config set falcon_custom_url http://example.com/path/to/falcon.zip
//example URL: http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon/lastSuccessfulBuild/artifact/out/apache-flex-falconjx-0.8.0-bin.zip
var customURL = process.env.npm_package_config_falcon_custom_url;
var isCustom = typeof customURL !== "undefined";
if(isCustom)
{
var downloadURL = customURL;
}
else
{
downloadURL = constants.APACHE_MIRROR_RESOLVER_URL + pathToFalconBinary + fileNameFalconBinary + '?' + constants.REQUEST_JSON_PARAM;
}
console.log('Downloading Apache Flex "Falcon" Compiler from ' + downloadURL);
if(isNightly)
if(isCustom)
{
request
.get(downloadURL)
@@ -64,18 +64,22 @@ ApacheFlexJS.extract = function()

ApacheFlexJS.install = function()
{
//uncomment to test a nightly build
var isNightly = process.env.npm_package_config_nightly === "true";
if(isNightly)
//to test with a nightly build or another custom URL, run the following
//command with your custom URL
//npm config set flexjs_custom_url http://example.com/path/to/flexjs.zip
//example URL: http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs/lastSuccessfulBuild/artifact/out/apache-flex-flexjs-0.8.0-bin.zip
var customURL = process.env.npm_package_config_flexjs_custom_url;
var isCustom = typeof customURL !== "undefined";
if(isCustom)
{
var downloadURL = process.env.npm_package_config_flexjs_nightly_url;
var downloadURL = customURL;
}
else
{
downloadURL = constants.APACHE_MIRROR_RESOLVER_URL + pathToFlexJSBinary + fileNameFlexJSBinary + '?' + constants.REQUEST_JSON_PARAM;
}
console.log('Downloading Apache FlexJS from ' + downloadURL);
if(isNightly)
if(isCustom)
{
request
.get(downloadURL)
@@ -1,11 +1,6 @@
{
"name": "flexjs",
"version": "0.8.0",
"config": {
"nightly": false,
"flexjs_nightly_url": "http://apacheflexbuild.cloudapp.net:8080/job/flex-asjs/lastSuccessfulBuild/artifact/out/apache-flex-flexjs-0.8.0-bin.zip",
"falcon_nightly_url": "http://apacheflexbuild.cloudapp.net:8080/job/flex-falcon/lastSuccessfulBuild/artifact/out/apache-flex-falconjx-0.8.0-bin.zip"
},
"description": "Apache FlexJS",
"keywords": [
"flex",

0 comments on commit 4d898af

Please sign in to comment.