cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alsoro...@apache.org
Subject cordova-paramedic git commit: CB-12629 Pass `--no-update-notifier` and `--no-telemetry` flags to each Cordova command invoked
Date Mon, 03 Apr 2017 14:45:05 GMT
Repository: cordova-paramedic
Updated Branches:
  refs/heads/master a8a39e63e -> 74cce8525


CB-12629 Pass `--no-update-notifier` and `--no-telemetry` flags to each Cordova command invoked


Project: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/commit/74cce852
Tree: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/tree/74cce852
Diff: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/diff/74cce852

Branch: refs/heads/master
Commit: 74cce8525b8404214e7603aa342378c2e57fd7b6
Parents: a8a39e6
Author: Alexander Sorokin <alexander.sorokin@akvelon.com>
Authored: Mon Apr 3 17:31:42 2017 +0300
Committer: Alexander Sorokin <alexander.sorokin@akvelon.com>
Committed: Mon Apr 3 17:31:42 2017 +0300

----------------------------------------------------------------------
 lib/ParamedicTargetChooser.js |  2 +-
 lib/PluginsManager.js         |  7 ++++---
 lib/appium/AppiumRunner.js    |  4 ++--
 lib/paramedic.js              | 10 +++++-----
 lib/utils/utilities.js        |  5 +++--
 5 files changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/74cce852/lib/ParamedicTargetChooser.js
----------------------------------------------------------------------
diff --git a/lib/ParamedicTargetChooser.js b/lib/ParamedicTargetChooser.js
index 731b391..c3544db 100644
--- a/lib/ParamedicTargetChooser.js
+++ b/lib/ParamedicTargetChooser.js
@@ -95,7 +95,7 @@ ParamedicTargetChooser.prototype.startAnAndroidEmulator = function (target)
{
 
 ParamedicTargetChooser.prototype.chooseTargetForWindows = function (emulator, target) {
     logger.info('cordova-paramedic: Choosing Target for Windows');
-    var windowsCommand = this.cli + ' run --list --emulator';
+    var windowsCommand = this.cli + ' run --list --emulator' + util.PARAMEDIC_COMMON_CLI_ARGS;
 
     logger.info('cordova-paramedic: Running command: ' + windowsCommand);
     var devicesResult = shelljs.exec(windowsCommand, {silent: true, async: false});

http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/74cce852/lib/PluginsManager.js
----------------------------------------------------------------------
diff --git a/lib/PluginsManager.js b/lib/PluginsManager.js
index c497bce..11b0736 100644
--- a/lib/PluginsManager.js
+++ b/lib/PluginsManager.js
@@ -21,6 +21,7 @@ var path = require('path');
 var fs = require('fs');
 var logger = require('./utils').logger;
 var exec = require('./utils').exec;
+var util = require('./utils').utilities;
 var PluginInfoProvider = require('cordova-common').PluginInfoProvider;
 var Server = require('./LocalServer');
 
@@ -43,7 +44,7 @@ PluginsManager.prototype.installTestsForExistingPlugins = function () {
     installedPlugins.forEach(function(plugin) {
         // there is test plugin available
         if (fs.existsSync(path.join(plugin.dir, 'tests', 'plugin.xml'))) {
-            var additionalArgs = '';
+            var additionalArgs = util.PARAMEDIC_COMMON_CLI_ARGS;
             if (plugin.id.indexOf('cordova-plugin-file-transfer') >= 0) {
                 if (me.config.getFileTransferServer()) {
                     // user specified a file transfer server address, so using it
@@ -79,7 +80,7 @@ PluginsManager.prototype.installSinglePlugin = function (plugin) {
     logger.normal('cordova-paramedic: installing ' + plugin);
     // var pluginPath = path.resolve(this.storedCWD, plugin);
 
-    var plugAddCmd = exec(this.config.getCli() + ' plugin add ' + plugin);
+    var plugAddCmd = exec(this.config.getCli() + ' plugin add ' + plugin + util.PARAMEDIC_COMMON_CLI_ARGS);
     if (plugAddCmd.code !== 0) {
         logger.error('Failed to install plugin : ' + plugin);
         throw new Error('Failed to install plugin : ' + plugin);
@@ -88,7 +89,7 @@ PluginsManager.prototype.installSinglePlugin = function (plugin) {
 
 PluginsManager.prototype.showPluginsVersions = function () {
     logger.verbose('cordova-paramedic: versions of installed plugins: ');
-    exec(this.config.getCli() + ' plugins');
+    exec(this.config.getCli() + ' plugins' + util.PARAMEDIC_COMMON_CLI_ARGS);
 };
 
 module.exports = PluginsManager;

http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/74cce852/lib/appium/AppiumRunner.js
----------------------------------------------------------------------
diff --git a/lib/appium/AppiumRunner.js b/lib/appium/AppiumRunner.js
index 760a352..2c5915e 100644
--- a/lib/appium/AppiumRunner.js
+++ b/lib/appium/AppiumRunner.js
@@ -418,7 +418,7 @@ AppiumRunner.prototype.prepareApp = function () {
     var fullAppPath = getFullAppPath(self.options.appPath);
     var deviceString = self.options.device ? ' --device' : '';
     var browserifyString = self.options.browserify ? ' --browserify' : '';
-    var buildCommand = self.options.cli + ' build ' + self.options.platform + deviceString
+ browserifyString;
+    var buildCommand = self.options.cli + ' build ' + self.options.platform + deviceString
+ browserifyString + util.PARAMEDIC_COMMON_CLI_ARGS;
 
     // remove medic.json and (re)build
     shell.rm(path.join(fullAppPath, 'www', 'medic.json'));
@@ -438,7 +438,7 @@ AppiumRunner.prototype.prepareApp = function () {
         permitAccess(fullAppPath, '*');
         // add cordova-save-image-gallery plugin from npm to enable
         // Appium tests for camera plugin to save test image to the gallery
-        runCommand(self.options.cli + ' plugin add cordova-save-image-gallery', fullAppPath);
+        runCommand(self.options.cli + ' plugin add cordova-save-image-gallery' + util.PARAMEDIC_COMMON_CLI_ARGS,
fullAppPath);
 
         // rebuild the app
         logger.normal('paramedic-appium: Building the app...');

http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/74cce852/lib/paramedic.js
----------------------------------------------------------------------
diff --git a/lib/paramedic.js b/lib/paramedic.js
index 6c61401..9464f42 100644
--- a/lib/paramedic.js
+++ b/lib/paramedic.js
@@ -134,7 +134,7 @@ ParamedicRunner.prototype.createTempProject = function () {
     this.tempFolder = tmp.dirSync();
     tmp.setGracefulCleanup();
     logger.info('cordova-paramedic: creating temp project at ' + this.tempFolder.name);
-    exec(this.config.getCli() + ' create ' + this.tempFolder.name);
+    exec(this.config.getCli() + ' create ' + this.tempFolder.name + util.PARAMEDIC_COMMON_CLI_ARGS);
 };
 
 ParamedicRunner.prototype.prepareProjectToRunTests = function () {
@@ -182,7 +182,7 @@ ParamedicRunner.prototype.installPlatform = function () {
     var platformId = this.config.getPlatformId();
     logger.info('cordova-paramedic: adding platform ' + platform);
 
-    return execPromise(this.config.getCli() + ' platform add ' + platform)
+    return execPromise(this.config.getCli() + ' platform add ' + platform + util.PARAMEDIC_COMMON_CLI_ARGS)
     .then(function () {
         logger.info('cordova-paramedic: successfully finished adding platform ' + platform);
         if (platformId === 'android' && self.config.isCI()) {
@@ -211,7 +211,7 @@ ParamedicRunner.prototype.checkPlatformRequirements = function () {
     var platformId = this.config.getPlatformId();
 
     logger.normal('cordova-paramedic: checking requirements for platform ' + platformId);
-    return execPromise(this.config.getCli() + ' requirements ' + platformId)
+    return execPromise(this.config.getCli() + ' requirements ' + platformId + util.PARAMEDIC_COMMON_CLI_ARGS)
     .then(function () {
         logger.info('cordova-paramedic: successfully finished checking requirements for platform
' + platformId);
     });
@@ -446,7 +446,7 @@ ParamedicRunner.prototype.waitForTests = function () {
 
 ParamedicRunner.prototype.getCommandForStartingTests = function () {
     var self = this;
-    var cmd  = self.config.getCli() + ' ' + this.config.getAction() + ' ' + this.config.getPlatformId();
+    var cmd  = self.config.getCli() + ' ' + this.config.getAction() + ' ' + this.config.getPlatformId()
+ util.PARAMEDIC_COMMON_CLI_ARGS;
     var paramedicTargetChooser = new ParamedicTargetChooser(this.tempFolder.name, this.config);
 
     if(self.config.getAction() === 'build' || (self.config.getPlatformId() === 'windows'
&& self.config.getArgs().indexOf('appx=8.1-phone') < 0)) {
@@ -484,7 +484,7 @@ ParamedicRunner.prototype.getCommandForStartingTests = function () {
 
 ParamedicRunner.prototype.getCommandForBuilding = function () {
     var browserifyArg = this.config.isBrowserify() ? ' --browserify' : '';
-    var cmd = this.config.getCli() + ' build ' + this.config.getPlatformId() + browserifyArg;
+    var cmd = this.config.getCli() + ' build ' + this.config.getPlatformId() + browserifyArg
+ util.PARAMEDIC_COMMON_CLI_ARGS;
 
     return cmd;
 };

http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/74cce852/lib/utils/utilities.js
----------------------------------------------------------------------
diff --git a/lib/utils/utilities.js b/lib/utils/utilities.js
index 61ace12..b575d6e 100644
--- a/lib/utils/utilities.js
+++ b/lib/utils/utilities.js
@@ -64,9 +64,9 @@ function getSimulatorsFolder() {
 function getSimulatorModelId(cli, target) {
     var findSimCommand;
     if (target) {
-        findSimCommand = cli + ' run --list --emulator | grep ' + target + ' | tail -n1';
+        findSimCommand = cli + ' run --list --emulator' + module.exports.PARAMEDIC_COMMON_CLI_ARGS
+ ' | grep ' + target + ' | tail -n1';
     } else {
-        findSimCommand = cli + ' run --list --emulator | grep ^iPhone | tail -n1';
+        findSimCommand = cli + ' run --list --emulator' + module.exports.PARAMEDIC_COMMON_CLI_ARGS
+ ' | grep ^iPhone | tail -n1';
     }
 
     logger.info('running:');
@@ -160,6 +160,7 @@ module.exports = {
     IOS:                        'ios',
     WINDOWS:                    'windows',
     PARAMEDIC_DEFAULT_APP_NAME: 'io.cordova.hellocordova',
+    PARAMEDIC_COMMON_CLI_ARGS:  ' --no-telemetry --no-update-notifier',
     SAUCE_USER_ENV_VAR:         'SAUCE_USER',
     SAUCE_KEY_ENV_VAR:          'SAUCE_ACCESS_KEY',
     SAUCE_HOST:                 'ondemand.saucelabs.com',


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message