Skip to content

Commit 98b12f2

Browse files
authored
chore: allow yarn as a canary installer (#19268)
As preparation for adding yarn canaries, and not just npm. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 4eac4de commit 98b12f2

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

packages/aws-cdk/test/integ/run-against-release

+11-1
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,24 @@
55
# - Run the script
66
set -eu
77
scriptdir=$(cd $(dirname $0) && pwd)
8+
CLI_INSTALLER="${CLI_INSTALLER:=npm}"
9+
10+
if [ ${CLI_INSTALLER} = "npm" ]; then
11+
install_command="install"
12+
elif [ ${CLI_INSTALLER} = "yarn" ]; then
13+
install_command="add"
14+
else
15+
echo "CLI_INSTALLER can only be set to either npm or yarn (got ${CLI_INSTALLER})"
16+
exit 1
17+
fi
818

919
# NPM Workspace. Will have CDK CLI installed into it.
1020
npmws=/tmp/cdk-runrelease
1121
rm -rf $npmws
1222
mkdir -p $npmws
1323

1424
# Install the CLI and put it on the PATH
15-
(cd $npmws && npm install aws-cdk@${RELEASE_TAG:-latest})
25+
(cd $npmws && ${CLI_INSTALLER} ${install_command} aws-cdk@${RELEASE_TAG:-latest})
1626

1727
# FRAMEWORK_VERSION is the version that will be 'npm install'ed by the tests
1828
if [[ "${FRAMEWORK_VERSION:-}" = "" ]]; then

0 commit comments

Comments
 (0)