mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	[esp32] Rebuild when idf_component.yml changes (#10540)
This commit is contained in:
		
				
					committed by
					
						 Jesse Hills
						Jesse Hills
					
				
			
			
				
	
			
			
			
						parent
						
							a1a336783e
						
					
				
				
					commit
					6f188d1284
				
			| @@ -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 | ||||
| @@ -1079,7 +1080,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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user