You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jo...@apache.org on 2017/05/30 18:35:26 UTC
[2/2] git commit: [flex-utilities] [refs/heads/develop] - npm-flexjs:
simplified the way that custom download URLs may be used for nightlies
npm-flexjs: simplified the way that custom download URLs may be used for nightlies
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/4d898afa
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/4d898afa
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/4d898afa
Branch: refs/heads/develop
Commit: 4d898afa7d1fa020a5b6dff191205cd9e3b13823
Parents: 86a18ec
Author: Josh Tynjala <jo...@apache.org>
Authored: Tue May 30 11:28:32 2017 -0700
Committer: Josh Tynjala <jo...@apache.org>
Committed: Tue May 30 11:28:32 2017 -0700
----------------------------------------------------------------------
npm-flexjs/dependencies/ApacheFalcon.js | 15 ++++++++++-----
npm-flexjs/dependencies/ApacheFlexJS.js | 14 +++++++++-----
npm-flexjs/package.json | 5 -----
3 files changed, 19 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4d898afa/npm-flexjs/dependencies/ApacheFalcon.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/ApacheFalcon.js b/npm-flexjs/dependencies/ApacheFalcon.js
index eba431a..3797aa9 100644
--- a/npm-flexjs/dependencies/ApacheFalcon.js
+++ b/npm-flexjs/dependencies/ApacheFalcon.js
@@ -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)
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4d898afa/npm-flexjs/dependencies/ApacheFlexJS.js
----------------------------------------------------------------------
diff --git a/npm-flexjs/dependencies/ApacheFlexJS.js b/npm-flexjs/dependencies/ApacheFlexJS.js
index 688fc4e..659ad09 100644
--- a/npm-flexjs/dependencies/ApacheFlexJS.js
+++ b/npm-flexjs/dependencies/ApacheFlexJS.js
@@ -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)
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/4d898afa/npm-flexjs/package.json
----------------------------------------------------------------------
diff --git a/npm-flexjs/package.json b/npm-flexjs/package.json
index 7db462f..7cc02d6 100644
--- a/npm-flexjs/package.json
+++ b/npm-flexjs/package.json
@@ -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",