Skip to content

Commit abb57b9

Browse files
committed
fix: 添加构建脚本分支支持以构建非master分支的插件
1 parent 0a02252 commit abb57b9

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

plugins/official/esengine-behavior-tree-editor/manifest.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"category": "Tool",
1111
"repository": {
1212
"type": "git",
13-
"url": "https://github.com/esengine/ecs-framework"
13+
"url": "https://github.com/esengine/ecs-framework",
14+
"branch": "refactor/extract-behavior-tree-editor"
1415
},
1516
"distribution": {
1617
"type": "cdn",

scripts/build-and-package.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,13 @@ try {
7474

7575
// 6. 克隆仓库
7676
const repoUrl = manifest.repository.url;
77+
const repoBranch = manifest.repository.branch || 'master';
7778
const cloneDir = path.join(TEMP_DIR, 'repo');
7879

79-
execSync(`git clone --depth 1 ${repoUrl} "${cloneDir}"`, {
80+
console.log(` Repository: ${repoUrl}`);
81+
console.log(` Branch: ${repoBranch}`);
82+
83+
execSync(`git clone --depth 1 --branch ${repoBranch} ${repoUrl} "${cloneDir}"`, {
8084
stdio: 'inherit',
8185
cwd: TEMP_DIR
8286
});

0 commit comments

Comments
 (0)