Pedro Piñera bio photo

Pedro Piñera

Mobile Engineer at SoundCloud and Open-Source ♥



SpeakerDeck Medium Email Twitter Facebook Google+ Github Stackoverflow

I’ve lately been working with multiple libraries and integrating them with CI, in particular Travis-CI because these libraries are Open Source. These libraries have dependencies that are resolved and built using Carthage which is distributed through Github Releases and Brew. However, the version in brew does not always match the last version available on Github Releases and your CI providers don’t offer the last version either. What can you do then?. Get the last version from Github and install it with a very simple script, how?:

Use that bash script passing as argument the version of Carthage that you want to install. It’ll download the last .pkg available and install it. For example, if we wanted to use it in our .travis.yml script:

language: objective-c
notifications:
  email: false
xcode_project: SugarRecord.xcodeproj
osx_image: xcode7.2
before_install:
  - bash update_carthage.sh 0.11

Short but useful! Enjoy coding