From c12a205ab8e195541acfe0cb654b4888e16ea05c Mon Sep 17 00:00:00 2001 From: Josh Spicer Date: Fri, 3 Jun 2022 10:46:25 -0400 Subject: Pass options via environment variables (#39) * up to docker-in-docker converted * first pass at the rest of the features (and bash linting and updated CLI * move shell linter to own file * rename feature.json -> devcontainer-feature.json * continue on error * continue on error in right spot * formatting * fix AZ_VERSION * update python * restore variable name * update linter actions, fix dind/dfd/desktop scripts, add test-scenaerios * add tree because I like tree * glob for shell linter * fix test-scenarios * shell linter * more shell helper --- src/aws-cli/devcontainer-feature.json | 21 +++++++++++++++++++++ src/aws-cli/feature.json | 21 --------------------- src/aws-cli/install.sh | 9 ++++----- 3 files changed, 25 insertions(+), 26 deletions(-) create mode 100644 src/aws-cli/devcontainer-feature.json delete mode 100644 src/aws-cli/feature.json (limited to 'src/aws-cli') diff --git a/src/aws-cli/devcontainer-feature.json b/src/aws-cli/devcontainer-feature.json new file mode 100644 index 0000000..ee1df10 --- /dev/null +++ b/src/aws-cli/devcontainer-feature.json @@ -0,0 +1,21 @@ +{ + "id": "aws-cli", + "name": "AWS CLI", + "options": { + "version": { + "type": "string", + "proposals": [ + "latest" + ], + "default": "latest", + "description": "Select or enter an AWS CLI version. (Available versions here: https://github.com/aws/aws-cli/blob/v2/CHANGELOG.rst)" + } + }, + "extensions": [ + "AmazonWebServices.aws-toolkit-vscode" + ], + "install": { + "app": "", + "file": "install.sh" + } +} \ No newline at end of file diff --git a/src/aws-cli/feature.json b/src/aws-cli/feature.json deleted file mode 100644 index ee1df10..0000000 --- a/src/aws-cli/feature.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "id": "aws-cli", - "name": "AWS CLI", - "options": { - "version": { - "type": "string", - "proposals": [ - "latest" - ], - "default": "latest", - "description": "Select or enter an AWS CLI version. (Available versions here: https://github.com/aws/aws-cli/blob/v2/CHANGELOG.rst)" - } - }, - "extensions": [ - "AmazonWebServices.aws-toolkit-vscode" - ], - "install": { - "app": "", - "file": "install.sh" - } -} \ No newline at end of file diff --git a/src/aws-cli/install.sh b/src/aws-cli/install.sh index 0d204de..b2566c9 100755 --- a/src/aws-cli/install.sh +++ b/src/aws-cli/install.sh @@ -6,12 +6,11 @@ # # Docs: https://github.com/microsoft/vscode-dev-containers/blob/main/script-library/docs/awscli.md # Maintainer: The VS Code and Codespaces Teams -# -# Syntax: ./awscli-debian.sh [AWS CLI version] set -e -AWSCLI_VERSION=${1:-"latest"} +VERSION=${VERSION:-"latest"} + AWSCLI_GPG_KEY=FB5DB77FD5C118B80511ADA8A6310ACC4672475C AWSCLI_GPG_KEY_MATERIAL="-----BEGIN PGP PUBLIC KEY BLOCK----- @@ -108,8 +107,8 @@ install() { local scriptSigFile=awscli.sig # See Linux install docs at https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html - if [ "${AWSCLI_VERSION}" != "latest" ]; then - local versionStr=-${AWSCLI_VERSION} + if [ "${VERSION}" != "latest" ]; then + local versionStr=-${VERSION} fi architecture=$(dpkg --print-architecture) case "${architecture}" in -- cgit v1.2.3