MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / execute_deployment

Function execute_deployment

mod/project/git/scripts/deploy.py:344–360  ·  view source on GitHub ↗

执行部署

(config, manual_branch, manual_commit, deploy_mode)

Source from the content-addressed store, hash-verified

342 return None, None, None, None, None
343
344def execute_deployment(config, manual_branch, manual_commit, deploy_mode):
345 """执行部署"""
346 deploy_type = config.get('type', 'site')
347
348 if deploy_type == 'site':
349 if deploy_mode == 1:
350 return auto_deploy(config)
351 elif deploy_mode == 2:
352 return manual_branch_deploy(config, manual_branch)
353 elif deploy_mode == 3:
354 return manual_rollback_deploy(config, manual_branch, manual_commit)
355 elif deploy_type == 'project':
356 log("项目类型部署,跳过...")
357 return True, ""
358 else:
359 log(f"未知部署类型: {deploy_type}", "❌")
360 return False, f"未知部署类型: {deploy_type}"
361
362if __name__ == '__main__':
363 # 记录开始时间

Callers 1

deploy.pyFile · 0.85

Calls 5

auto_deployFunction · 0.85
manual_branch_deployFunction · 0.85
manual_rollback_deployFunction · 0.85
logFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected