From d1d0f12473f9341cc4ea64c5f484e8ed1d030741 Mon Sep 17 00:00:00 2001 From: Stefan M Date: Fri, 4 Oct 2019 11:42:07 +0200 Subject: [PATCH] Fix CI on master --- .circleci/config.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7102bbd..36c43cf 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,22 +22,26 @@ jobs: - run: working_directory: my-site/themes/hugo-fresh command: | + set +e isPrIfGreaterThanZero=$(expr $CIRCLE_BRANCH : "pull") - if [ isPrIfGreaterThanZero > 0 ]; then + echo $isPrIfGreaterThanZero + if [ "$isPrIfGreaterThanZero" -gt "0" ]; then echo "Hello World $CIRCLE_BRANCH" git fetch origin ${CIRCLE_BRANCH}/head:BRANCHNAME git checkout BRANCHNAME else echo "Hello World else $CIRCLE_BRANCH" - git checkout ${CIRCLE_BRANCH} + git checkout $CIRCLE_BRANCH fi - run: name: Replace default config working_directory: my-site command: | + set +e isPrIfGreaterThanZero=$(expr $CIRCLE_BRANCH : "pull") - if [ isPrIfGreaterThanZero > 0 ]; then + echo $isPrIfGreaterThanZero + if [ "$isPrIfGreaterThanZero" -gt "0" ]; then branch=${CIRCLE_SHA1} else branch=${CIRCLE_BRANCH}