1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-07 20:33:47 +01:00

[esp32] Improve version handling (#10899)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Jonathan Swoboda
2025-10-05 18:10:23 -04:00
committed by GitHub
parent e2c5eeef97
commit c6e4a7911c
2 changed files with 93 additions and 158 deletions

View File

@@ -7,9 +7,10 @@ import subprocess
import sys
import tempfile
from esphome.components.esp32 import ESP_IDF_PLATFORM_VERSION as ver
from esphome.components.esp32 import PLATFORM_VERSION_LOOKUP
from esphome.helpers import write_file_if_changed
ver = PLATFORM_VERSION_LOOKUP["recommended"]
version_str = f"{ver.major}.{ver.minor:02d}.{ver.patch:02d}"
root = Path(__file__).parent.parent
boards_file_path = root / "esphome" / "components" / "esp32" / "boards.py"