Merge "Initialize ERROR_ON_CLONE flag in grenaderc"

This commit is contained in:
Jenkins 2017-04-07 13:43:55 +00:00 committed by Gerrit Code Review
commit b615ee9831
2 changed files with 6 additions and 0 deletions

View File

@ -69,6 +69,10 @@ ENABLE_TEMPEST=${ENABLE_TEMPEST:-True}
# We need RECLONE to get the updated branches; not everyone wants it though
RECLONE=${RECLONE:-no}
# Set this to True if you want to abort execution with an error if a git repo
# does not exist
ERROR_ON_CLONE=${ERROR_ON_CLONE:-False}
# Allow only running parts of this script
RUN_BASE=${RUN_BASE:-True}
RUN_TARGET=${RUN_TARGET:-True}

View File

@ -106,6 +106,8 @@ function git_clone {
local git_clone_flags=""
RECLONE=$(trueorfalse False RECLONE)
ERROR_ON_CLONE=$(trueorfalse False ERROR_ON_CLONE)
if [[ "${GIT_DEPTH}" -gt 0 ]]; then
git_clone_flags="$git_clone_flags --depth $GIT_DEPTH"
fi