From 4f74818742ca765449de672e96243fd31b3a305f Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Thu, 14 Sep 2017 12:56:35 -0400 Subject: [PATCH] Fix CircleCI script to skip Greenkeeper branch builds Somehow I completely failed at copying code [from StackOverflow](https://speakerdeck.com/noelrap/the-road-to-legacy-is-paved-with-good-intentions) in https://github.com/pelias/api/pull/983. Instead of skipping Docker image builds only for branches with greenkeeper in the name, it _always_ skipped the build! Connects https://github.com/pelias/dockerfiles/issues/21 --- .circleci/docker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/docker.sh b/.circleci/docker.sh index 655799d4..1acd51cb 100644 --- a/.circleci/docker.sh +++ b/.circleci/docker.sh @@ -7,7 +7,7 @@ DOCKER_REPOSITORY="pelias" DOCKER_PROJECT="${DOCKER_REPOSITORY}/${CIRCLE_PROJECT_REPONAME}" # skip builds on greenkeeper branches -if [ "${CIRCLE_BRANCH##greenkeeper}" ]; then +if [[ -z "${CIRCLE_BRANCH##*greenkeeper*}" ]]; then exit 0 fi