Is there a way to use a pull request with cocoapods?

人走茶凉 提交于 2019-12-07 00:33:11

问题


With swift 3, many cocoapods have been scrambling to keep up with the changes each beta brings. Sometimes these changes aren't merged into a branch quickly. In those cases, is there a way to use a pull request of a branch?

Example: https://github.com/MengTo/Spring/pull/187/commits/d791055bc43bba9af8124d2832c2d8cd95ecfc11


回答1:


You can always specify a specific commit or branch to pull in with your pod file.

So, if you wanted the swift3 branch from the master repo, it'd be as simple as:

pod 'Spring', :git => 'https://github.com/MengTo/Spring.git', :branch => 'swift3'

However, this pull request did not come from the master repo. We need to figure out where it came from.

In this case, it came from this repo, so we just need to change what repository it came from (the branch name in that repo is actually the same):

pod 'Spring', :git => 'https://github.com/sammygutierrez/Spring.git', :branch => 'swift3'


来源:https://stackoverflow.com/questions/39261018/is-there-a-way-to-use-a-pull-request-with-cocoapods

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!