()
| 109 | |
| 110 | |
| 111 | def get_required_submodule_paths(): |
| 112 | gitmodules_path = os.path.join(os.getcwd(), ".gitmodules") |
| 113 | |
| 114 | if not os.path.isfile(gitmodules_path): |
| 115 | logger.error(".gitmodules file not found.") |
| 116 | exit(1) |
| 117 | |
| 118 | with open(gitmodules_path, "r") as file: |
| 119 | lines = file.readlines() |
| 120 | |
| 121 | # Extract paths of required submodules |
| 122 | required_paths = {} |
| 123 | for line in lines: |
| 124 | if line.strip().startswith("path ="): |
| 125 | path = line.split("=")[1].strip() |
| 126 | for submodule, file_name in REQUIRED_SUBMODULES.items(): |
| 127 | if submodule in path: |
| 128 | required_paths[path] = file_name |
| 129 | return required_paths |
| 130 | |
| 131 | |
| 132 | def check_and_update_submodules(): |
no test coverage detected