So I'm working in an iOS project using cocoapods. I have some custom libraries that are added via cocoapods. For example:
pod 'MyLibrary', :git => 'git@git.mydomain.com:pods/mylibrary-pod.git', :tag => '1.1'
I'd like to change the MyLibrary's version depending on the current git branch I am. Something like that:
if DEVELOP_BRANCH
pod 'MyLibrary', :git => 'git@git. mydomain.com:pods/mylibrary-develop-pod.git', :tag => '1.1.7'
else if MASTER_BRANCH
pod 'MyLibrary', :git => 'git@git. mydomain.com:pods/mylibrary-pod.git', :tag => '1.1'
But I don't know if there is any way to check the current git branch from my local repository. Does someone knows if it's possible and a way to do it?