(
src_dir: Path,
liblist: LibListConfig,
archs: Iterable[str],
sm_arch_win: str,
addr: str,
commit_id: str,
clean: bool,
package: str,
)
| 111 | |
| 112 | |
| 113 | def main( |
| 114 | src_dir: Path, |
| 115 | liblist: LibListConfig, |
| 116 | archs: Iterable[str], |
| 117 | sm_arch_win: str, |
| 118 | addr: str, |
| 119 | commit_id: str, |
| 120 | clean: bool, |
| 121 | package: str, |
| 122 | ): |
| 123 | |
| 124 | if clean: |
| 125 | _clean_files(src_dir, liblist.cleanfiles) |
| 126 | |
| 127 | if package: |
| 128 | git_path = src_dir / ".git" |
| 129 | if git_path.exists(): |
| 130 | shutil.rmtree(git_path) |
| 131 | logging.debug(f"Removed directory: {git_path}") |
| 132 | else: |
| 133 | logging.warning(f"git path not exist, ignored: {git_path}") |
| 134 | if clean or package: |
| 135 | _check_banned_symbols(src_dir, symbols=("__LUNOWUD", )) |
| 136 | |
| 137 | if package: |
| 138 | compress(Path.cwd() / package, Path(src_dir)) |
| 139 | |
| 140 | |
| 141 | if __name__ == "__main__": |
no test coverage detected