如何使用Bower安装回购的最新(未标记)状态? [英] How to install latest (untagged) state of a repo using bower?
问题描述
我有一个非常小仓库,我在master分支中从事所有开发工作,并使用标签作为历史上的稳定点。
I have a very small repo in which I do all dev work in the master branch and use tags as "stable" points in history.
我猜默认情况下,Bower似乎会获取最新的 tagged 版本的回购协议。我正在尝试在master分支中获取最新的提交。
I guess by default Bower seems to fetch the latest tagged version of a repo. I'm trying to get the most recent commit in the master branch.
我已经尝试过以所有可能的顺序运行所有这些操作:
I've tried running all these, in every conceivable order:
bower cache-clean mypackage
bower install mypackage --force-latest
bower install mypackage --force --force-latest
bower install mypackage --force
我也尝试添加最新
到我的bower.json文件:
I've also tried adding latest
to my bower.json file:
"dependencies": {
"mypackage": "latest"
}
然后运行:
bower update mypackage
否不管总是获得最新的标记状态是什么。
No matter what it seems to always get the latest tagged state.
如何获取项目的最新,最新,未标记状态?
How do I get the latest, most up-to-date, untagged state of the project?
推荐答案
指定git commit SHA而不是版本:
Specify a git commit SHA instead of a version:
bower install '<git-url>#<git-commit-sha>'
示例:
bower install 'git://github.com/yeoman/stringify-object.git#d2895fb97d'
您也可以指定分支而不是SHA,但是通常不建议这样做,除非它正在开发中然后您控制所有部分。
You can also specify a branch instead of a SHA, but that's generally not recommended unless it's in development and you control all the parts.
这篇关于如何使用Bower安装回购的最新(未标记)状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!