From 8626e3af2c3989873951706d3d904f42be257c37 Mon Sep 17 00:00:00 2001 From: Matthew B White Date: Mon, 13 Feb 2017 16:41:57 +0000 Subject: [PATCH 1/2] profiling #1 --- .travis.yml | 4 ++++ .travis/deploy.sh | 3 ++- .travis/deploy_docs.sh | 3 ++- .travis/script.sh | 2 ++ .../composer-cli/lib/cmds/archive/createCommand.js | 11 ++++++----- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0206bbee78..6f34d09333 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,7 @@ addons: packages: - graphviz before_install: | + date set -ev set -o pipefail ./.travis/should-run.sh @@ -31,10 +32,13 @@ before_install: | wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - echo "deb http://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list sudo apt-get update && sudo apt-get install cf-cli + date install: | + date set -ev set -o pipefail npm install 2>&1 | tee + date script: ./.travis/script.sh deploy: provider: script diff --git a/.travis/deploy.sh b/.travis/deploy.sh index 96c5221b12..7f2c0091d3 100755 --- a/.travis/deploy.sh +++ b/.travis/deploy.sh @@ -6,7 +6,7 @@ set -o pipefail # Grab the Concerto directory. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" - +date # Check that this is the right node.js version. if [ "${TRAVIS_NODE_VERSION}" != "" -a "${TRAVIS_NODE_VERSION}" != "4" ]; then echo Not executing as not running primary node.js version. @@ -120,3 +120,4 @@ else git push origin develop fi +date diff --git a/.travis/deploy_docs.sh b/.travis/deploy_docs.sh index 7523436136..a8f24818b2 100755 --- a/.travis/deploy_docs.sh +++ b/.travis/deploy_docs.sh @@ -6,7 +6,7 @@ set -o pipefail # Grab the directory. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" - +date # Set the GitHub deploy key we will use to publish. set-up-ssh --key "$encrypted_f19708b15817_key" \ --iv "$encrypted_f19708b15817_iv" \ @@ -35,3 +35,4 @@ git add . git commit -m "Automated deploy to ${REPO}" git push +date diff --git a/.travis/script.sh b/.travis/script.sh index 29e57010dc..8c0be066ba 100755 --- a/.travis/script.sh +++ b/.travis/script.sh @@ -7,6 +7,7 @@ set -o pipefail # Grab the Concerto directory. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )" +date # Start the X virtual frame buffer used by Karma. if [ -r "/etc/init.d/xvfb" ]; then export DISPLAY=:99.0 @@ -36,3 +37,4 @@ else npm run build:prod fi +date diff --git a/packages/composer-cli/lib/cmds/archive/createCommand.js b/packages/composer-cli/lib/cmds/archive/createCommand.js index e460c2142a..8025fe026c 100644 --- a/packages/composer-cli/lib/cmds/archive/createCommand.js +++ b/packages/composer-cli/lib/cmds/archive/createCommand.js @@ -20,11 +20,11 @@ module.exports.command = 'create [options]'; module.exports.describe = 'Create the details of a Business Network Archive'; module.exports.builder = function (yargs){ - return yargs.option('archiveFile',{alias: 'a', required: false, describe: 'Business network archive file name. Default is based on the Identifier of the BusinessNetwork', type: 'string' }) - .option('inputDir',{alias: 'd', required: false, describe: 'Location to create the archive from e.g. NPM module directory'}) - .option('moduleName',{alias: 'm', required: false, describe: 'Name of the npm module to use '}) - .conflicts('inputDir','moduleName') - .epilog('Only one of either inputDir or moduleName must be specified.'); + return yargs.option('archiveFile',{alias: 'a', required: false, describe: 'Business network archive file name. Default is based on the Identifier of the BusinessNetwork', type: 'string' }) + .option('sourceType',{alias: 't', required: true, choices: ['module','dir'], describe: 'npm module name or a directory as the source of the Business Network'}) + .option('sourceName',{alias: 'n', required: true, describe: 'Name of the npm module or directory'}) + .usage(''); + }; @@ -36,6 +36,7 @@ module.exports.handler = (argv) => { process.exit(0); }) .catch((error) => { + console.log(error+ '\nCommand failed.'); process.exit(1); }); From 4119a0ae6c1ec53c97bb1eb5bc8f1470bc8103f6 Mon Sep 17 00:00:00 2001 From: Matthew B White Date: Mon, 13 Feb 2017 17:17:08 +0000 Subject: [PATCH 2/2] experimental remove caching --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6f34d09333..3a83c0a1cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,6 +46,4 @@ deploy: skip_cleanup: true on: all_branches: true -cache: - directories: - - $HOME/.npm +cache: false