【发布时间】:2018-03-09 04:55:16
【问题描述】:
我正在将我正在开发的一个工具应用到我们工作中的一个项目中。该工具位于私有 bitbucket 存储库中,我将其拉入项目中,并在项目的 package.json 中使用以下依赖行:
"content-deployment-tool": "git+https://<account>:<apikey>@bitbucket.org/<account>/content-deployment-tool.git#2.0.2",
这行得通,但它是一个 PITA b/c,每次我在 content-deployment-tool 存储库中更新和推送新标签时,我都必须增加标签号。
我尝试过使用语义版本控制通配符来记下我想要的版本号,例如 …#^2.0.0,但尝试时出现错误。
npm ERR! code 1
npm ERR! Command failed: /usr/bin/git checkout ^2.0.0
npm ERR! error: pathspec '^2.0.0' did not match any file(s) known to git.
我是否需要每次都对其进行硬编码?我很难找到有关从私人存储库中特别注意版本号的文档。
【问题讨论】: