From d5d0ab5746d6882ef930861ea3289a95fdb8f3c3 Mon Sep 17 00:00:00 2001 From: nethsix Date: Mon, 1 Aug 2016 14:40:50 +0900 Subject: [PATCH] Add condition to provide different git commands for master & pull reqs --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index f143851..03aff49 100644 --- a/circle.yml +++ b/circle.yml @@ -4,4 +4,4 @@ machine: 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" + - 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"