迦太基:如何获取给定存储库的最新版本? [英] Carthage: How to get the very latest version of a given repository?

查看:104
本文介绍了迦太基:如何获取给定存储库的最新版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Cartfile文档进行断言:

The Cartfile documentation makes the assertion:


如果没有给出版本要求,则允许任何版本的依赖项。

If no version requirement is given, any version of the dependency is allowed.

与矛盾的例子:

# Use the latest version
github "jspahrsummers/xcconfigs"

此外,未说明,但是从测试来看,我推断最新实际上是最新标签的版本。这种解释是否正确?如果是这样,如何指定最新的提交 - 你必须手动检查并指定最新的提交,还是有更简单的方法?

Furthermore, it is not stated, but from testing, I infer that "latest" is actually the version of the latest tag. Is this interpretation correct? And if so, how does one specify the very latest commit - do you have to manually check and specify the latest commit, or is there a simpler way?

推荐答案

文档声明


Carthage支持多种版本要求:

Carthage supports several kinds of version requirements:


  • > = 1.0表示至少版本1.0

  • 〜> 1.0表示兼容版本1.0

  • == 1.0表示确切版本1.0

  • some-branch-or-tag-or-commit用于特定的Git对象(git rev-parse允许的任何内容)

  • >= 1.0 for "at least version 1.0"
  • ~> 1.0 for "compatible with version 1.0"
  • == 1.0 for "exactly version 1.0"
  • "some-branch-or-tag-or-commit" for a specific Git object (anything allowed by git rev-parse)

所以我相信

github "jspahrsummers/xcconfigs" "HEAD"

应该按预期工作,因为HEAD是一个有效的参数 git rev-parse

should work as expected, since "HEAD" is a valid argument for git rev-parse

或者

github "jspahrsummers/xcconfigs" "master"

或任何其他分支

这篇关于迦太基:如何获取给定存储库的最新版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆