From fe06406f1893085b9d05b993e15b0510f8e4b272 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Wed, 9 Dec 2015 16:37:18 +0100 Subject: [PATCH] Fixed pulling and cloning of acceptance tests --- scripts/runAcceptanceTests.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/runAcceptanceTests.sh b/scripts/runAcceptanceTests.sh index e4b35d2d..44f02761 100644 --- a/scripts/runAcceptanceTests.sh +++ b/scripts/runAcceptanceTests.sh @@ -1,8 +1,21 @@ #!/bin/sh +set -e -git clone https://github.com/spring-cloud-samples/brewery.git +REPOSRC=https://github.com/spring-cloud-samples/brewery.git +LOCALREPO=brewery + +LOCALREPO_VC_DIR=$LOCALREPO/.git + +if [ ! -d $LOCALREPO_VC_DIR ] +then + git clone $REPOSRC $LOCALREPO + cd $LOCALREPO +else + cd $LOCALREPO + git reset --hard + git pull $REPOSRC +fi -cd brewery ./gradlew clean build docker --parallel docker-compose up -d