From 8c55cfcebf96292a8f1fed15be6371a8fe179c63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Wed, 16 Jun 2021 10:29:54 +0200 Subject: [PATCH 1/2] Add devcontainer (#1247) --- .devcontainer/devcontainer.json | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..bcd20a4c7 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,27 @@ +// https://github.com/microsoft/vscode-dev-containers/tree/v0.183.0/containers/python-3 +{ + "name": "ESPHome - docs", + "image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.6", + "postCreateCommand": "pip3 install -r requirements.txt", + "forwardPorts": [8000], + "settings": { + "python.pythonPath": "/usr/local/bin/python", + "python.languageServer": "Pylance", + "python.linting.enabled": true, + "python.linting.pylintEnabled": true, + "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", + "python.formatting.blackPath": "/usr/local/py-utils/bin/black", + "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", + "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", + "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", + "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", + "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", + "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", + "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint" + }, + + "extensions": [ + "ms-python.python", + "ms-python.vscode-pylance" + ] +} From ea49078810ec4215a2785d560186925f27e19b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20S=C3=B8rensen?= Date: Wed, 16 Jun 2021 10:47:49 +0200 Subject: [PATCH 2/2] Fallback to the beta branch if ref is missing (#1249) --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 99f18abd3..c6bacd6f1 100644 --- a/Makefile +++ b/Makefile @@ -21,14 +21,16 @@ help: api: mkdir -p _build/html/api @if [ ! -d "$(ESPHOME_PATH)" ]; then \ - git clone --branch $(ESPHOME_REF) https://github.com/esphome/esphome.git $(ESPHOME_PATH); \ + git clone --branch $(ESPHOME_REF) https://github.com/esphome/esphome.git $(ESPHOME_PATH) || \ + git clone --branch beta https://github.com/esphome/esphome.git $(ESPHOME_PATH); \ fi ESPHOME_PATH=$(ESPHOME_PATH) doxygen Doxygen netlify-api: netlify-dependencies mkdir -p _build/html/api @if [ ! -d "$(ESPHOME_PATH)" ]; then \ - git clone --branch $(ESPHOME_REF) https://github.com/esphome/esphome.git $(ESPHOME_PATH); \ + git clone --branch $(ESPHOME_REF) https://github.com/esphome/esphome.git $(ESPHOME_PATH) || \ + git clone --branch beta https://github.com/esphome/esphome.git $(ESPHOME_PATH); \ fi ESPHOME_PATH=$(ESPHOME_PATH) ../doxybin/doxygen Doxygen