Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Carthage: How to get the very latest version of a given repository?

The Cartfile documentation makes the assertion:

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

with the contradictory example:

# 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?

like image 934
Chris Conover Avatar asked Jul 16 '15 16:07

Chris Conover


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.

What is Cartfile resolved?

The Cartfile. resolved file ensures that any given commit of a Carthage project can be bootstrapped in exactly the same way, every time. For this reason, you are strongly recommended to commit this file to your repository.


1 Answers

The documentation states

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)

so I believe

github "jspahrsummers/xcconfigs" "HEAD" 

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

Alternatively

github "jspahrsummers/xcconfigs" "master" 

or any other branch

like image 64
Gabriele Petronella Avatar answered Oct 02 '22 12:10

Gabriele Petronella