安装的 Bower 依赖项不是最新的提交

Installed bower dependencies not on latest commit

我有一个 git 项目,其中包含一个 bower.json 文件,该文件包含多个依赖项。它看起来像这样:

//module1
"dependencies": {
    "devbridge-autocomplete": "devbridge/jQuery-Autocomplete#~1.2.21",
    "backbone": "~1.2.1",
    "underscore": "~1.8.3",
    "jquery": "~2.1.4",
    "module2": "gitUser/module2",
    "module3": "gitUser/module3"
  }

问题是我 运行 bower install --save gitUser/module1 bower 没有从 github 中提取最新的提交,而只提取初始提交。

bower.json of module2 和 3 本质相似:

{
  "name": "module2",
  "main": "module2.js",
  "version": "0.0.0",
  "authors": [
    "gitUser <gitUser@gitUser.com>"
  ],
  "moduleType": [
    "amd"
  ],
  "license": "MIT",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components",
    "directory/bower_components",
    "test",
    "tests"
  ]
}

隐藏的克隆存储库。bower.json 看起来像:

{
  "name": "module2",
  "_cacheHeaders": {
    "Content-Type": "text/html; charset=utf-8"
  },
  "main": "index",
  "_source": "https://github.com/gitUser/module2",
  "_target": "*",
  "_originalSource": "https://github.com/gitUser/module2"
}

我也尝试通过以下方式在 module1 中安装依赖项但未成功:

bower install --save gitUser/module2#latest

我也试过为每个子模块添加 git 标签,但这也没有用。 我看到 this 问题,所以标记应该无关紧要。

感谢任何帮助!

如果您想要来自特定分支的最新提交:

bower install --save gitUser/module2#specific_branch_name

如果你想要一个特定的提交:

bower install --save gitUser/module2#specific_commit_id