Skip to content

Commit ba51d95

Browse files
authored
Merge pull request #631 from bensonhome/main
🎨优化自定义工具拉取依赖逻辑
2 parents 17385ce + ca5b5d1 commit ba51d95

10 files changed

Lines changed: 4 additions & 8 deletions

client/node/localtask/taskprocessmgr.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,7 @@ def get_supported_processes(origin_os_env, task_name, task_params, custom_tools)
5757
# 加载工具执行需要的环境变量
5858
task_params["tool_name"] = task_name
5959
task_list = ConfigUtil.generate_task_list(task_params)
60-
if ConfigUtil.use_new_tool_lib_config(task_params): # 使用依赖库配置
61-
tool_names = [task_name]
62-
else: # 使用ini配置
63-
if task_name in custom_tools:
64-
tool_names = ["customtool"]
65-
else:
66-
tool_names = [task_name]
67-
ToolLoader(tool_names=tool_names, task_list=task_list, custom_tools=custom_tools,
60+
ToolLoader(tool_names=[task_name], task_list=task_list, custom_tools=custom_tools,
6861
include_common=True).set_tool_env()
6962

7063
# 加载任务环境变量
-512 Bytes
Binary file not shown.
-11.1 KB
Binary file not shown.
-157 KB
Binary file not shown.
-10.1 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
-316 KB
Binary file not shown.
-184 Bytes
Binary file not shown.

client/util/scmurlmgr.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ def get_last_dir_name_from_url(scm_url):
5252
dirname = dirname.replace(".zip", "")
5353
if dirname.endswith(".7z"):
5454
dirname = dirname.replace(".7z", "")
55+
# 如果url包含分支,即 .git#BranchName 的格式,目录名删除.git
56+
if ".git#" in dirname:
57+
dirname = dirname.replace(".git#", "#")
5558
return dirname
5659

5760

0 commit comments

Comments
 (0)