From 8bda7b330b4b08b51e52190b956e1b40c49014a0 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Fri, 1 Sep 2023 17:07:46 +0000 Subject: [PATCH] Changing the extensions.json structure to have more order. Updating to version 1.1.0 --- entrypoint.sh | 4 ++-- readme.md | 36 +++++++++++++++++++++++++++++++----- version.txt | 2 +- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3cedd16..5962d1d 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -20,8 +20,8 @@ if [ -f "/home/extensions.json" ]; then # Read the JSON file into a variable jsonExtensions=$(cat /home/extensions.json) - # Use jq to extract the array elements - extensions=$(echo $jsonExtensions | jq -r '.[]') + # Use jq to extract the extension parameter from the JSON array + extensions=$(echo $jsonExtensions | jq -r '.[].extensionsGroup[].extensions[].uniqueIdentifier') # Loop through the extensions and process each element for extension in $extensions; do diff --git a/readme.md b/readme.md index 56fc6f0..15d56b3 100644 --- a/readme.md +++ b/readme.md @@ -19,12 +19,38 @@ The following environment variables can be set when running the Docker container ### Adding VSCode Extensions -To add VSCode extensions to the container, create a JSON file with an array of strings containing the extension identifier of each extension you want to install. For example: +To add VSCode extensions to the container, create a JSON file with an array of objects containing the extension details you want to install, the only Mandatory field is uniqueIdentifier and follow this structure. For example: ``` -[ - "ms-python.python", - "ms-vscode.cpptools", - "ms-azuretools.vscode-docker" +[ + { + "extensionsGroup": { + "description": "Extensions of Spanish Language Pack", + "extensions": [ + { + "name": "Spanish Language Pack for Visual Studio Code", + "notes": "Extension of Spanish Language Pack for Visual Studio Code", + "uniqueIdentifier": "ms-ceintl.vscode-language-pack-es" + } + ] + } + }, + { + "extensionsGroup": { + "description": "Extensions of Github Copilot", + "extensions": [ + { + "name": "GitHub Copilot", + "notes": "Extension of GitHub Copilot", + "uniqueIdentifier": "github.copilot" + }, + { + "name": "GitHub Copilot Chat", + "notes": "Extension of GitHub Copilot Chat", + "uniqueIdentifier": "github.copilot-chat" + } + ] + } + } ] ``` diff --git a/version.txt b/version.txt index 855f702..1cc5f65 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.25 \ No newline at end of file +1.1.0 \ No newline at end of file