machine:
  services:
    - docker

test:
  override:
     - docker run -it nethsix/ruby-tensorflow-ubuntu:0.0.1.a /bin/bash -l -c "mkdir -p /repos/ruby-tensorflow/circle-ci && cd /repos/ruby-tensorflow/circle-ci && git clone $CIRCLE_REPOSITORY_URL && cd /repos/ruby-tensorflow/circle-ci/$CIRCLE_PROJECT_REPONAME && git fetch origin $CIRCLE_BRANCH/head && git checkout FETCH_HEAD && bundle install && cd /repos/ruby-tensorflow/circle-ci/$CIRCLE_PROJECT_REPONAME/ext/sciruby/tensorflow_c && ruby extconf.rb && make && make install && cd /repos/ruby-tensorflow/circle-ci/$CIRCLE_PROJECT_REPONAME && bundle exec rake install && bundle exec rspec"

machine:
  services:
    - docker

test:
  override:
     - docker run -it nethsix/ruby-tensorflow-ubuntu:0.0.1.a /bin/bash -l -c "mkdir -p /repos/ruby-tensorflow/circle-ci && cd /repos/ruby-tensorflow/circle-ci && git clone $CIRCLE_REPOSITORY_URL && cd /repos/ruby-tensorflow/circle-ci/$CIRCLE_PROJECT_REPONAME && (([[ $CIRCLE_BRANCH == 'master' ]] && git checkout $CIRCLE_BRANCH && git pull) || (git fetch origin $CIRCLE_BRANCH/head && git checkout FETCH_HEAD)) && bundle install && cd /repos/ruby-tensorflow/circle-ci/$CIRCLE_PROJECT_REPONAME/ext/sciruby/tensorflow_c && ruby extconf.rb && make && make install && cd /repos/ruby-tensorflow/circle-ci/$CIRCLE_PROJECT_REPONAME && bundle exec rake install && bundle exec rspec"

Add condition to provide different git commands for master & pull reqs
Add condition to provide different git commands for master & pull reqs
