Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add submodule files to a Github release?

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.

like image 379
cooow Avatar asked Jan 11 '16 10:01

cooow


People also ask

How do I add a git submodule to an existing project?

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.

Where do you put submodule?

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.


1 Answers

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.

like image 108
VonC Avatar answered Nov 02 '22 21:11

VonC