如何将子模块文件添加到Github版本? [英] How to add submodule files to a Github release?

查看:254
本文介绍了如何将子模块文件添加到Github版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在git GitHub仓库中有一个子模块,并且已经创建了它的一个版本。



我的存储库具有这种结构(非常经典):

  repo_A(主存储库)
dir_A.1
dir_A.2(子模块)
dir_A.3

但是当我下载版本时,dir_A.2中没有任何内容。



有什么方法可以添加dir_A .2文件到发布档案?



出于一个非常具体的原因,我需要他们在下载时间,而不是之后(我正在构建一个debian包并且该工具正在检查归档对应于 b
$ b


Github支持回答了我:


目前不可能。尽管感谢您的建议!我已将其添加到我们的团队列表中供您考虑。




解决方案

GitHub tarball存档( API内容)从来没有包含子模块,以我知道。

子模块可以指向任何git repo(像另一个gitHub repo,但是私有的repo,或者不可访问的git repo GitHub)。



您有这样的脚本,它允许构建一切(父回购和子模块)的git存档,但这需要一个 git clone --recursive first。



OP cooow 确认 $ b


Github的支持回答了我:


目前无法使用。

感谢您的建议!我已将它添加到我们的团队列表中供您考虑。




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.

解决方案

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.

这篇关于如何将子模块文件添加到Github版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆