Heroku使用子模块自动推送到github(Heroku automatic push to github with submodules)

系统教程 行业动态 更新时间:2024-06-14 16:57:40
Heroku使用子模块自动推送到github(Heroku automatic push to github with submodules)

Heroku 自动从github到heroku提供了一个漂亮的部署 :

但它也说:

使用子模块的GitHub repos通常无法在Heroku上正确部署。 这是因为在生成repo-content tarball时,GitHub不包含子模块内容。

这是否意味着如果我有子模块就没有解决方法?

目前,该功能变得毫无用处

我发现他们的信息非常简短,特别是当他们真正建议使用子模块时 。

他们不能触发一个git push heroku master吗? 和/或至少保留以前的子模块内容(以便在子模块不变时工作,这是99%的情况)。 或者我应该提供对heroku的子模块内容的访问权限?

任何反馈将不胜感激。

Heroku offers a beautiful deploy to from github to heroku automatically:

But it also says:

GitHub repos that use submodules will generally not deploy correctly on Heroku. This is because GitHub does not include submodule contents when repo-content tarballs are generated.

Does that mean there is no workaround if I have submodules?

For now the feature simply becomes useless.

I find their message very short and sharp, especially when they actually recommend to use submodules.

Can't they trigger a git push heroku master? And/or at least to keep the former submodule content (so that it works when the submodule is unchanged, which is 99% of the cases). Or should I provide access to the submodule content to heroku?

Any feedback will be appreciated.

最满意答案

实际上,GIT推送不是使用GitHub Sync时执行的操作。 相反,使用平台api 。 该API端点采用tarball URL并在应用程序上部署它。

GitHub提供的tarball不包含GIT存储库的内容。 只有应用程序。 因此,无法检索该内容并在那里包含存储库。

我已经设置了一个buildpack来为你做这个: https : //github.com/dmathieu/heroku-buildpack-submodules

它将解析您的.gitmodules内容并在构建期间安装所有子模块,而不是关心是否存在.git文件夹。

Indeed, a GIT push is not what is performed when using GitHub Sync. Instead, the platform api is used. That API endpoint takes a tarball URL and deploys it on the app.

The tarball provided by GitHub doesn't include the content of the GIT repository. Only the app. It is therefore impossible to retrieve that content and include the repository there.

I have setup a buildpack which will do this for you though: https://github.com/dmathieu/heroku-buildpack-submodules

It will parse your .gitmodules content and install all submodules during your build, not caring whether there is a .git folder or not present.

更多推荐

本文发布于:2023-04-13 12:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/5a69d281e4ed2f6dd7bd8773441bfc83.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:模块   github   Heroku   submodules   push

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!