Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build a Carthage framework from git branch

Alamofire has a bug that is fixed in a future release. The author has already fixed the bug and the solution is merged in the master branch. Is there any way for me to use carthage so I can create a framework file that includes this fix? Currently when I use carthage against AF repo it clones release v4.4 which still has the bug.

I would also be open to a solution, where in I can checkout the latest code from AF repo on my local machine and use carthage to create a framework locally. I just want the SessionDelegate.swift file to contain the latest code so I can move forward with my testing.

like image 287
java_doctor_101 Avatar asked May 14 '17 00:05

java_doctor_101


1 Answers

In short, the branch can be referenced by name by using the following in your Cartfile:

github "Alamofire/Alamofire" "branch-name"

For a little bit more in-depth explanation of what this can accomplish, consult the 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)

I found the answer here, but felt the question was not a duplicate, despite the fact that the answer is.

like image 199
Joshua Breeden Avatar answered Oct 23 '22 05:10

Joshua Breeden