CircleCI测试中过时的子模块

时间:2015-10-21 11:26:54

标签: git github circleci

使用CircleCI执行集成我发现子模块版本存在问题。

我不知道CircleCI是否存在问题,可能是我的GitHub配置或配置错误的子模块配置文件存在问题。

我有一个存储库,其中有一个客户端。此客户端需要另一个存储库中的协议。 该协议是客户端子模块。 我使用协议库中的分支jrpc_if。

.gitmodules文件内容为:

[submodule "protocol"]
    path = protocol
    url = git@github.com:satnet-project/protocol.git
    branch = jrpc_if

它还修改了.git目录下的配置文件,其内容如下。

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = git@github.com:satnet-project/generic-client.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[submodule "protocol"]
    url = git@github.com:satnet-project/protocol.git

要启动子模块,请使用以下命令。它们位于配置文件circle.yml。

checkout:
  post:
    - git submodule update --init
    - cd protocol && git checkout jrpc_if

最后一个命令只是检查分支。我得到这个屏幕输出:

cd protocol && git checkout jrpc_if

Previous HEAD position was 00936bc... Problems fixed
Switched to branch 'jrpc_if'
Your branch is up-to-date with 'origin/jrpc_if'.

问题是在执行协议测试时,子模块文件与最后一个GitHub存储库不匹配。

有人能给我一些建议吗?

谢谢。

0 个答案:

没有答案