diff --git a/grenaderc b/grenaderc index 8df524e5..1910f379 100644 --- a/grenaderc +++ b/grenaderc @@ -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} diff --git a/inc/bootstrap b/inc/bootstrap index 81db7596..36badd62 100644 --- a/inc/bootstrap +++ b/inc/bootstrap @@ -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