gpt4 book ai didi

gitolite 在 'wild' 存储库创建上运行 Hook

转载 作者:太空狗 更新时间:2023-10-29 13:46:08 24 4
gpt4 key购买 nike

我需要运行一个脚本,该脚本将在我的团队成员创建新存储库时生成 projects.list 文件。

我们开发从“master”分支出来的固件,但分支永远不会 merge 回 master。由于永远不会 merge 回来,我决定为每个不同版本的固件创建存储库。我开发了一个 bash 脚本,它将为我创建 projects.list 文件。

find repositories/ -iname "*.git" -type d | grep --invert-match "gitolite-admin" | sed 's/repositories\///g' > /srv/git/projects.list

现在我无法创建调用该脚本的 Hook 。

我尝试让 gitolite 为我生成文件,但没有成功。任何帮助表示赞赏。谢谢!

回答

在 config/gitolite.conf 中,我使 repo def 看起来像这样:

repo    Firmware/[a-zA-Z0-9].*/[a-zA-Z0-9].*
C = @all
RW+ = @all
R = gitweb
config gitweb.owner = Repo Manager

最佳答案

Gitolite "interfacing with external tools" 中所述,

The list of gitweb-readable repos is written to a file whose name is given by the rc file variable GITWEB_PROJECTS_LIST.
The default value of this variable, if it is not specified or empty, is $HOME/projects.list.

因此,除非您让特殊用户 gitweb 可以读取您的 repo,否则 Gitolite 不会为您生成/完成 $HOME/projects.list

关于gitolite 在 'wild' 存储库创建上运行 Hook ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11214264/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com