From 461c253f82715b7ba6423fe8a34cf8549e20ecf7 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Thu, 25 Apr 2019 11:34:13 +0200 Subject: [PATCH] chore: remove arguments from `pack.sh` (#2374) Not all `npm run package` scripts accept arguments, and in fact the handwritten ones that end in ` ... && npm pack` will break, because when executing `pack.sh -v` (for verbosity in packages that use cdk-build-tools) they will execute `npm -v` instead of `npm pack -v`. This is not safe! --- buildspec.yaml | 2 +- pack.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/buildspec.yaml b/buildspec.yaml index 129f6ecab5ce0..b23384f617e95 100644 --- a/buildspec.yaml +++ b/buildspec.yaml @@ -12,7 +12,7 @@ phases: - /bin/bash ./build.sh post_build: commands: - - "[ -f .BUILD_COMPLETED ] && /bin/bash ./pack.sh -v" + - "[ -f .BUILD_COMPLETED ] && /bin/bash ./pack.sh" artifacts: files: - "**/*" diff --git a/pack.sh b/pack.sh index 65965b4fd32ac..7941312b1f4aa 100755 --- a/pack.sh +++ b/pack.sh @@ -16,7 +16,7 @@ scopes=$(lerna ls 2>/dev/null | grep -v "(private)" | cut -d" " -f1 | xargs -n1 # Run the "cdk-package" script in all modules. For jsii modules, this invokes jsii-pacmak which generates and builds multi-language # outputs. For non-jsii module, it will just run "npm pack" and place the output in dist/npm # (which is similar to how pacmak outputs it). -lerna run ${scopes} --sort --stream package -- -- "$@" +lerna run ${scopes} --sort --stream package # Collect dist/ from all modules into the root dist/ for dir in $(find packages -name dist | grep -v node_modules); do