Skip to content

Commit

Permalink
chore: remove arguments from pack.sh (aws#2374)
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
rix0rrr authored Apr 25, 2019
1 parent 2d44ed7 commit 461c253
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion buildspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- "**/*"
Expand Down
2 changes: 1 addition & 1 deletion pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 461c253

Please sign in to comment.