ios - Carthage:如何获取给定存储库的最新版本?

标签 ios xcode macos swift carthage

Cartfile 文档做出断言:

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

举个矛盾的例子:

# Use the latest version
github "jspahrsummers/xcconfigs"

另外,没有明说,但通过测试,我推断“latest”实际上是latest标签的版本。这种解释正确吗?如果是这样,如何指定最新的提交 - 您是否必须手动检查并指定最新的提交,或者是否有更简单的方法?

最佳答案

documentation

Carthage supports several kinds of version requirements:

  • >= 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

的有效参数

或者

github "jspahrsummers/xcconfigs" "master"

或任何其他分支机构

关于ios - Carthage:如何获取给定存储库的最新版本?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31459847/

相关文章:

ios - 碰撞检测和 animateWithDuration

ios - 是否可以将Alexa Skills Kit与iOS移动应用程序集成以触发事件?

iOS 停止全局队列运行

ios - Xcode 6 矢量应用程序图标

java - shell命令前的$是什么

Mac 中的 Android Studio 路径错误

iphone - 具有多个实体的 CoreData 编程

ios - 12 小时后重新启动应用程序 objective-c

ios - 如何从 iOS 中的非 UI 线程更新 UI 标签

python - 如何从命令行安装 DMG 文件?