Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update just one library from the Cartfile with Carthage?

Tags:

carthage

My Cartfile has many libraries. When I do carthage update it goes through all the libraries. That can take very long time.

Is there a way to update just a single library with carthage? Something like this? (this will not work)

carthage update "evgenyneu/moa" 
like image 293
Evgenii Avatar asked Jun 03 '15 07:06

Evgenii


People also ask

How do you update Carthage dependencies?

If you've modified your Cartfile, or you want to update to the newest versions of each framework (subject to the requirements you've specified), simply run the carthage update command again. If you only want to update one, or specific, dependencies, pass them as a space-separated list to the update command.

Should I commit Cartfile resolved?

Cartfile. resolved: This file serves as a companion to the Cartfile. It defines exactly which versions of your dependencies Carthage selected for installation. It's strongly recommended to commit this file to your version control repository.


2 Answers

From 0.12 version build, checkout, and update take an optional space separated list of dependencies

For a Cartfile like the following

github "Alamofire/Alamofire" github "ReactiveX/RxSwift" 

You could choose to update one dependency

carthage update Alamofire 

or multiple dependencies

carthage update Alamofire RxSwift 

If you need to add flags, add them last:

carthage update Alamofire --platform iOS 
like image 154
Alex Salom Avatar answered Sep 18 '22 15:09

Alex Salom


Carthage supports updating single dependencies now.If you have something like this in your Cartfile:

github "bitstadium/HockeySDK-iOS" 

Then you can update only this one dependency by running

carthage update HockeySDK-iOS 
like image 43
user978510 Avatar answered Sep 17 '22 15:09

user978510