如何使用capistrano部署来定位具体的提交SHA [英] How do I target a specific commit SHA with capistrano deploy
本文介绍了如何使用capistrano部署来定位具体的提交SHA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何使用Capistrano在Git中定位特定的SHA,以进行部署?它应该是像
I am wondering how I can target a specific commit SHA in Git for deployment, using Capistrano? It should be something like
cap deploy --version=<sha targeted>
在大量搜索后似乎找不到答案。
Can't seem to find the answer to this after a lot of searching.
推荐答案
对于Capistrano 2.9至3.0:
cap -S revision=80655da8d80aaaf92ce5357e7828dc09adb00993 deploy
Capistrano ,您可以通过执行以下操作部署特定的git commit / tree / branch /标签:
For older versions of Capistrano, you can deploy a particular git commit/tree/branch/tag by doing this:
cap -s branch=80655da8d80aaaf92ce5357e7828dc09adb00993 deploy
在某些情况下,可能需要指定环境作为参数。 生产
只是一个例子。
In some cases there may be a need of specifying the Environment as an argument as well. production
is just an example.
cap production -S revision=80655da8d80aaaf92ce5357e7828dc09adb00993 deploy
这篇关于如何使用capistrano部署来定位具体的提交SHA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文