| 244 | class SourceDirLoader(object): |
| 245 | """代码目录拉取、复用或更新""" |
| 246 | def __init__(self, params, task_type, tool, inc_src): |
| 247 | self.task_type = task_type |
| 248 | self.params = params |
| 249 | self.tool = tool |
| 250 | self.inc_src = inc_src |
| 251 | # 是否拉取子模块 |
| 252 | ignore_submodule_clone = self.params.get("ignore_submodule_clone") |
| 253 | if ignore_submodule_clone: |
| 254 | self.enable_submodules = False |
| 255 | else: |
| 256 | self.enable_submodules = True |
| 257 | # 是否拉取git lfs, 如果环境变量为False,表示不拉取;如果为True、None或不存在都表示拉取 |
| 258 | lfs_flag = self.params.get("lfs_flag") |
| 259 | if lfs_flag is False: |
| 260 | self.enable_lfs = False |
| 261 | else: |
| 262 | self.enable_lfs = True |
| 263 | |
| 264 | def load_source_dir(self): |
| 265 | logger.info("start __checkout_source_dir.") |