From 19c9767c1d7f630100e80519f23bd9b2ab89eff7 Mon Sep 17 00:00:00 2001 From: Jazz Turner-Baggs <473256+jazzz@users.noreply.github.com> Date: Thu, 9 Jan 2025 00:36:38 -0800 Subject: [PATCH] Fix dev-container templating (#70) * Update dev-container templating * Remove redundant toolchain declaration * updated CHANGELOG --- CHANGELOG.md | 1 + template/.devcontainer/Dockerfile | 3 --- template/.devcontainer/devcontainer.json | 15 ++++++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f2dbc70..1668fe6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Verify the required options are provided (#65) +- Added missing template substitution in devcontainer.json (#70) ### Removed diff --git a/template/.devcontainer/Dockerfile b/template/.devcontainer/Dockerfile index 52fd5e1..dc54478 100644 --- a/template/.devcontainer/Dockerfile +++ b/template/.devcontainer/Dockerfile @@ -54,9 +54,6 @@ RUN if [ -n "${GITHUB_TOKEN}" ]; then export GITHUB_TOKEN=${GITHUB_TOKEN}; fi \ --log-level debug \ --export-file /home/${CONTAINER_USER}/export-esp.sh -# Set default toolchain -RUN rustup default {{ toolchain }} - # Activate ESP environment RUN echo "source /home/${CONTAINER_USER}/export-esp.sh" >> ~/.bashrc diff --git a/template/.devcontainer/devcontainer.json b/template/.devcontainer/devcontainer.json index 3b0294a..3f931e9 100644 --- a/template/.devcontainer/devcontainer.json +++ b/template/.devcontainer/devcontainer.json @@ -1,14 +1,17 @@ //INCLUDEFILE dev-container { - "name": "{{ crate_name }}", + //REPLACE project-name project-name + "name": "project-name", // Select between image and build properties to pull or build the image. - // "image": "docker.io/espressif/idf-rust:{{ mcu }}_latest", + //REPLACE mcu mcu + // "image": "docker.io/espressif/idf-rust:mcu_latest", "build": { "dockerfile": "Dockerfile", "args": { "CONTAINER_USER": "esp", "CONTAINER_GROUP": "esp", - "ESP_BOARD": "{{ mcu }}" + //REPLACE mcu mcu + "ESP_BOARD": "mcu" } }, "customizations": { @@ -44,6 +47,8 @@ 8000, 3333 ], - "workspaceMount": "source=${localWorkspaceFolder},target=/home/esp/{{ crate_name }},type=bind,consistency=cached", - "workspaceFolder": "/home/esp/{{ crate_name }}" + //REPLACE project-name project-name + "workspaceMount": "source=${localWorkspaceFolder},target=/home/esp/project-name,type=bind,consistency=cached", + //REPLACE project-name project-name + "workspaceFolder": "/home/esp/project-name" }