Skip to content

Commit 24aea79

Browse files
committed
Add workaround for a multi-chart stdout issue
1 parent f2c9b45 commit 24aea79

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/generate

+12-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22

33
set -ue
44

5-
/discover | while read -r cdk8s; do
5+
SCRIPT_DIR=$(readlink -f "$(dirname "$0")")
6+
7+
"$SCRIPT_DIR/discover" | while read -r cdk8s; do
68
pushd "$(dirname "$cdk8s")" >/dev/null
7-
npx cdk8s --check-upgrade=false synth -p
9+
DIR=$(mktemp -d)
10+
11+
# Right now, cdk8s-cli has an issue with `-p` option when used with multiple charts:
12+
# https://github.com/cdk8s-team/cdk8s-cli/issues/943 We work around it by outputting files outselves.
13+
npx cdk8s --check-upgrade=false synth -o "$DIR" > /dev/null
14+
find "$DIR" -type f | while read -r line; do
15+
cat "$line"
16+
echo "---"
17+
done
818
popd >/dev/null
919
done

0 commit comments

Comments
 (0)