1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 19:02:18 +01:00

Adds support cpp to vscode (#1828)

Co-authored-by: Stefan Agner <stefan@agner.ch>
This commit is contained in:
dentra
2021-06-15 01:45:22 +03:00
committed by GitHub
parent 93f8ee7e60
commit c411043681
5 changed files with 58 additions and 26 deletions

View File

@@ -28,11 +28,6 @@ def write_version(version: str):
r"ARG BUILD_FROM=esphome/esphome-base-amd64:.*",
f"ARG BUILD_FROM=esphome/esphome-base-amd64:{version}",
)
sub(
"docker/Dockerfile.dev",
r"FROM esphome/esphome-base-amd64:.*",
f"FROM esphome/esphome-base-amd64:{version}",
)
sub(
"docker/Dockerfile.lint",
r"FROM esphome/esphome-lint-base:.*",

18
script/devcontainer-post-create Executable file
View File

@@ -0,0 +1,18 @@
#!/bin/bash
set -e
# set -x
mkdir -p config
pip3 install -e .
cpp_json=.vscode/c_cpp_properties.json
if [ ! -f $cpp_json ]; then
echo "Initializing PlatformIO..."
pio init --ide vscode --silent
sed -i "/\\/workspaces\/esphome\/include/d" $cpp_json
else
echo "Cpp environment already configured. To reconfigure it you could run one the following commands:"
echo " pio init --ide vscode -e livingroom8266"
echo " pio init --ide vscode -e livingroom32"
fi