Fix CI on master

This commit is contained in:
Stefan M
2019-10-04 11:42:07 +02:00
committed by StefMa
parent e8076b98cf
commit d1d0f12473

View File

@@ -22,22 +22,26 @@ jobs:
- run: - run:
working_directory: my-site/themes/hugo-fresh working_directory: my-site/themes/hugo-fresh
command: | command: |
set +e
isPrIfGreaterThanZero=$(expr $CIRCLE_BRANCH : "pull") isPrIfGreaterThanZero=$(expr $CIRCLE_BRANCH : "pull")
if [ isPrIfGreaterThanZero > 0 ]; then echo $isPrIfGreaterThanZero
if [ "$isPrIfGreaterThanZero" -gt "0" ]; then
echo "Hello World $CIRCLE_BRANCH" echo "Hello World $CIRCLE_BRANCH"
git fetch origin ${CIRCLE_BRANCH}/head:BRANCHNAME git fetch origin ${CIRCLE_BRANCH}/head:BRANCHNAME
git checkout BRANCHNAME git checkout BRANCHNAME
else else
echo "Hello World else $CIRCLE_BRANCH" echo "Hello World else $CIRCLE_BRANCH"
git checkout ${CIRCLE_BRANCH} git checkout $CIRCLE_BRANCH
fi fi
- run: - run:
name: Replace default config name: Replace default config
working_directory: my-site working_directory: my-site
command: | command: |
set +e
isPrIfGreaterThanZero=$(expr $CIRCLE_BRANCH : "pull") isPrIfGreaterThanZero=$(expr $CIRCLE_BRANCH : "pull")
if [ isPrIfGreaterThanZero > 0 ]; then echo $isPrIfGreaterThanZero
if [ "$isPrIfGreaterThanZero" -gt "0" ]; then
branch=${CIRCLE_SHA1} branch=${CIRCLE_SHA1}
else else
branch=${CIRCLE_BRANCH} branch=${CIRCLE_BRANCH}