From 1a145e36361420713f1497291e79ff3f65d80cc5 Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Wed, 28 Oct 2015 17:46:08 +0100 Subject: Reversed: Added reset to rally commit ID in prepare_env.sh I did not realized it was correct, however there was a small bug. The rally repo git reset command is done after the if-else clause. Change-Id: Ia6f61ae3a3d09a5148cfbea7c47cf317fd949c11 Signed-off-by: jose.lausuch --- docker/prepare_env.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docker/prepare_env.sh b/docker/prepare_env.sh index 493f2f88a..454ba4e3b 100755 --- a/docker/prepare_env.sh +++ b/docker/prepare_env.sh @@ -108,10 +108,7 @@ if [ $offline == false ]; then fi info "Rally repo: pulling to latest..." git pull - if [ ${RALLY_COMMIT} != "latest" ]; then - info "Rally repo: given commit is ${RALLY_COMMIT}. Reseting..." - git reset --hard ${RALLY_COMMIT} - fi + # We leave the reset command for later. info "Updating vIMS test repository...." cd ${VIMS_REPO_DIR} @@ -129,7 +126,9 @@ if [ $offline == false ]; then fi # We do this regardless if its online or offline mode. +# Assumption: the docker image contains a newer rally repo than the given commit. if [ ${RALLY_COMMIT} != "latest" ]; then + cd ${RALLY_REPO_DIR} info "Rally repo: given commit is ${RALLY_COMMIT}. Reseting..." git reset --hard ${RALLY_COMMIT} fi -- cgit 1.2.3-korg