如何使用Carthage从Cartfile更新一个库?

Evg*_*nii 72 carthage

我的Cartfile有很多库.当我这样做时,carthage update它会遍历所有库.这可能需要很长时间.

有没有办法用carthage更新一个库?像这样的东西?(这不起作用)

carthage update "evgenyneu/moa"
Run Code Online (Sandbox Code Playgroud)

Ale*_*lom 123

0.12版本开始 build,checkoutupdate采用可选空格分隔的依赖项列表

对于如下的Cartfile

github "Alamofire/Alamofire"
github "ReactiveX/RxSwift"
Run Code Online (Sandbox Code Playgroud)

您可以选择更新一个依赖项

carthage update Alamofire
Run Code Online (Sandbox Code Playgroud)

或多个依赖项

carthage update Alamofire RxSwift
Run Code Online (Sandbox Code Playgroud)

  • **carthage update Box --no-use-binaries --platform iOS**//如果你需要指定其他标志 (24认同)

小智 10

Carthage现在支持更新单个依赖项.如果你在Cartfile中有这样的东西:

github "bitstadium/HockeySDK-iOS"
Run Code Online (Sandbox Code Playgroud)

然后,您可以通过运行仅更新此一个依赖项

carthage update HockeySDK-iOS
Run Code Online (Sandbox Code Playgroud)


mok*_*gio 8

现在答案是否定的......如果你的跑步,carthage help update你会看到

Update and rebuild the project's dependencies

[--configuration Release]
    the Xcode configuration to build (ignored if --no-build option is present)

[--platform all]
    the platform to build for (ignored if --no-build option is present)

[--verbose]
    print xcodebuild output inline (ignored if --no-build option is present)

[--no-build]
    skip the building of dependencies after updating

[--use-ssh]
    use SSH for downloading GitHub repositories

[--use-submodules]
    add dependencies as Git submodules

[--no-use-binaries]
    check out dependency repositories even when prebuilt frameworks exist (ignored if --no-build option is present)

[--color auto]
    whether to apply color and terminal formatting (one of ‘auto’, ‘always’, or ‘never’)

[/path/to/your/app]
    the directory containing the Carthage project
Run Code Online (Sandbox Code Playgroud)

正如您所看到的,没有提到只指定一个要更新的依赖项的选项.

您应该在项目仓库上打开一个问题,要求支持该问题.


Sea*_*159 7

如果框架未存储在GitHub中,或者您正在使用git标识符,则cartfile外观如下所示:

git "ssh://git@bitbucket.org/teamname/repo-name.git" ~> 1.0
Run Code Online (Sandbox Code Playgroud)

那么您只能更新运行以下命令的那个

carthage update repo-name
Run Code Online (Sandbox Code Playgroud)


Ron*_*ini 6

我尝试了所有答案,对我而言,仅在运行后临时删除评论存储库

carthage update --platform ios

将Catfile恢复到以前的状态后


Rui*_*Rui 5

我最终编写了自己的脚本,该脚本为我构建了一个依赖项并将其与我现有的依赖项合并。您可以在https://github.com/ruipfcosta/carthage-workarounds找到它。