Skip to content

Commit c18d98d

Browse files
authored
Add support for bundling cherry-picked branches in Build Process (#911)
* Use ComfyUI cherry-picks. * Add git identity in makeComfy.js. * Use branch for cherry-picks. * Remove git username. * Remove comment. * Checkout optional branch.
1 parent 20e924c commit c18d98d

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

package.json

+5-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
"type": "module",
1212
"config": {
1313
"frontendVersion": "1.9.15",
14-
"comfyVersion": "0.3.14",
14+
"comfyUI": {
15+
"version": "0.3.14",
16+
"optionalBranch": "desktop-release-feb172025"
17+
},
1518
"managerCommit": "1434b12c343b58a401f1c9f913965ceb0cfd089e",
1619
"uvVersion": "0.5.26"
1720
},
@@ -112,4 +115,4 @@
112115
"wait-on": "^8.0.1",
113116
"yaml": "^2.6.0"
114117
}
115-
}
118+
}

scripts/makeComfy.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ import pkg from './getPackage.js';
55
const comfyRepo = 'https://github.com/comfyanonymous/ComfyUI';
66
const managerRepo = 'https://github.com/Comfy-Org/ComfyUI-Manager';
77

8-
execSync(`git clone ${comfyRepo} --depth 1 --branch v${pkg.config.comfyVersion} assets/ComfyUI`);
8+
if (pkg.config.comfyUI.optionalBranch) {
9+
// Checkout branch.
10+
execSync(`git clone ${comfyRepo} --depth 1 --branch ${pkg.config.comfyUI.optionalBranch} assets/ComfyUI`);
11+
} else {
12+
// Checkout tag as branch.
13+
execSync(`git clone ${comfyRepo} --depth 1 --branch v${pkg.config.comfyUI.version} assets/ComfyUI`);
14+
}
915
execSync(`git clone ${managerRepo} assets/ComfyUI/custom_nodes/ComfyUI-Manager`);
1016
execSync(`cd assets/ComfyUI/custom_nodes/ComfyUI-Manager && git checkout ${pkg.config.managerCommit} && cd ../../..`);
1117
execSync(`yarn run make:frontend`);

vite.base.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function getBuildConfig(env: ConfigEnv): UserConfig {
2626
clearScreen: false,
2727

2828
define: {
29-
__COMFYUI_VERSION__: JSON.stringify(pkg.config.comfyVersion),
29+
__COMFYUI_VERSION__: JSON.stringify(pkg.config.comfyUI.version),
3030
__COMFYUI_DESKTOP_VERSION__: JSON.stringify(process.env.npm_package_version),
3131
},
3232

0 commit comments

Comments
 (0)