I've a submodule inside of my git Github repository and I've created a release of it.
My repository has this kind of structure (very classic) :
repo_A (main repository)
dir_A.1
dir_A.2 (submodule)
dir_A.3
But when I download the release, there is nothing inside of "dir_A.2".
Is there any way to add the dir_A.2 files to the release archive ?
For a very specific reason, I need them at the download time, not after (I'm building a debian package and the tool is checking that the archive corresponds to the unpacked files).
The Github support answered me :
This is not possible currently. Thanks for the suggestion though! I have added it to our list for our team to consider.
In order to add a Git submodule, use the “git submodule add” command and specify the URL of the Git remote repository to be included as a submodule. When adding a Git submodule, your submodule will be staged. As a consequence, you will need to commit your submodule by using the “git commit” command.
A submodule can be located anywhere in a parent Git repository's working directory and is configured via a . gitmodules file located at the root of the parent repository. This file contains which paths are submodules and what URL should be used when cloning and fetching for that submodule.
A GitHub tarball archive (API Content) never includes the submodules, to my knownledge.
A submodule can point to any git repo (like another gitHub repo, but a private one, or a git repo not accessible from GitHub).
You have scripts like this one which allows to build a git archive of everything (parent repo andsubmodules), but that would require a git clone --recursive
first.
The OP cooow confirms in the comments:
The Github support answered me :
This is not possible currently.
Thanks for the suggestion though! I have added it to our list for our team to consider.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With