1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 20:32:21 +01:00

[esp32] Rebuild when idf_component.yml changes (#10540)

This commit is contained in:
Jonathan Swoboda
2025-09-03 11:47:51 -04:00
committed by GitHub
parent 68628a85b1
commit 4d681ffe3d
2 changed files with 10 additions and 1 deletions

View File

@@ -40,6 +40,7 @@ from esphome.cpp_generator import RawExpression
import esphome.final_validate as fv
from esphome.helpers import copy_file_if_changed, mkdir_p, write_file_if_changed
from esphome.types import ConfigType
from esphome.writer import clean_cmake_cache
from .boards import BOARDS, STANDARD_BOARDS
from .const import ( # noqa
@@ -1074,7 +1075,11 @@ def _write_idf_component_yml():
contents = yaml_util.dump({"dependencies": dependencies})
else:
contents = ""
write_file_if_changed(yml_path, contents)
if write_file_if_changed(yml_path, contents):
dependencies_lock = CORE.relative_build_path("dependencies.lock")
if os.path.isfile(dependencies_lock):
os.remove(dependencies_lock)
clean_cmake_cache()
# Called by writer.py

View File

@@ -310,6 +310,10 @@ def clean_build():
if os.path.isdir(piolibdeps):
_LOGGER.info("Deleting %s", piolibdeps)
shutil.rmtree(piolibdeps)
dependencies_lock = CORE.relative_build_path("dependencies.lock")
if os.path.isfile(dependencies_lock):
_LOGGER.info("Deleting %s", dependencies_lock)
os.remove(dependencies_lock)
GITIGNORE_CONTENT = """# Gitignore settings for ESPHome