Skip to content

Testing against osx and ubuntu in the same time

Ivan Evgrafov edited this page Jul 8, 2015 · 2 revisions

Intro

To test gem against osx I created 'osx' branch with different travis config and git hook. So now each time I push changes to 'master' they are merged and pushed into 'osx' too and tested against mac os.

Hook file:

.git/hooks/pre-push

Hook contents:

current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
if [ "master" == "$current_branch" ]; then
  git checkout osx
  git merge master
  git push
  git checkout master
fi
exit 0
Clone this wiki locally