forked from aws/aws-cdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(lambda-layer-awscli): add update mechanism for AWS CLI (aws#18780)
We bundle the AWS CLI. This adds a mechanism to keep up with new updates of the CLI. It adds a script that should be executed periodically to create a PR with a version update. We had to install and bump to Python v3 because newer versions of the AWS CLI have ended support for Python 2.7. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
4 changed files
with
41 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.22.46 |
19 changes: 19 additions & 0 deletions
19
packages/@aws-cdk/lambda-layer-awscli/build-tools/bump-awscli-version.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
set -eu | ||
scriptdir=$(cd $(dirname $0) && pwd) | ||
|
||
package=awscli | ||
tmpfile=_pip.json | ||
|
||
curl -LsSf https://pypi.org/pypi/awscli/json > $tmpfile | ||
trap "rm $tmpfile" EXIT | ||
version=$(node -p "require('./${tmpfile}').info.version") | ||
|
||
if [[ $version != 1.* ]]; then | ||
echo "Expected version 1.*, got ${version}" >&2 | ||
exit 1 | ||
fi | ||
|
||
echo "AWS CLI is currently at ${version}" | ||
|
||
echo $version > $scriptdir/../awscli.version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters