comfy-cli
comfy-cli copied to clipboard
Submodules not included in published archive
Is there currently a way for a node creator to have submodules downloaded with the original repo?
Nodes that depend on submodules are typically cloned using git clone <url> --recursive so that the submodules are cloned as well.
What seemed like a solution was to add submodules: true in the github action for publishing the node as seen in this commit, but it does not seem to have worked because the directory for the submodule remains empty when downloading the .zip from the registry website.
Further discussion here: https://github.com/ssitu/ComfyUI_UltimateSDUpscale/pull/140#issuecomment-2702000406
Hey @ssitu! 👋 I'm here to help you with bug fixes, questions, and contributing while you wait for a human maintainer. Let's squash those bugs together!
The submodules: true setting in GitHub Actions is intended to ensure that submodules are included when the repository is checked out during the workflow. However, this setting only affects the cloning process within the GitHub Actions environment and does not impact the contents of the .zip file generated by GitHub when downloading the repository from the registry. The .zip file does not include submodules by default, as it is a snapshot of the repository's main content without submodules.
To include submodules in the published archive, you might need to create a custom script within your GitHub Actions workflow that manually initializes and updates the submodules after checking out the repository. This can be done using the following commands:
git submodule init
git submodule update
After ensuring the submodules are included, you can package the repository and its submodules into a .zip file or another archive format for distribution. This approach requires additional steps in your workflow to handle the packaging process.
To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
A possible workaround for those who will struggle with the same issue can be found here: 142
@ssitu sorry for late reply. seems like you already solved the problem. Did you have multiple layers of submodules to include?
Future viewers can use this as a sample: https://github.com/ssitu/ComfyUI_UltimateSDUpscale/pull/140
Yes, we found a solution to upload the submodule to the registry. We also download the submodule if it somehow isn't found in the designated folder.
I don't think I have multiple layers of submodules. The recursive flag is just for brevity.