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

[core] Only clean build files with esp-idf (#7388)

This commit is contained in:
Jesse Hills
2024-09-02 19:11:21 +12:00
committed by GitHub
parent 854bafbd4a
commit ca8e45cf4c
2 changed files with 21 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ from esphome.config import iter_component_configs, iter_components
from esphome.const import (
ENV_NOGITIGNORE,
HEADER_FILE_EXTENSIONS,
PLATFORM_ESP32,
SOURCE_FILE_EXTENSIONS,
__version__,
)
@@ -107,7 +108,10 @@ def storage_should_clean(old: StorageJSON, new: StorageJSON) -> bool:
if old.build_path != new.build_path:
return True
if old.loaded_integrations != new.loaded_integrations:
return True
if new.core_platform == PLATFORM_ESP32:
from esphome.components.esp32 import FRAMEWORK_ESP_IDF
return new.framework == FRAMEWORK_ESP_IDF
return False