From 9c52ce87987b43b639428f8f6ff9fa938a9bbea5 Mon Sep 17 00:00:00 2001 From: "Sean M. Collins" Date: Fri, 8 Nov 2019 13:37:25 -0500 Subject: [PATCH] Make depth of 1 to be the default Based on https://github.com/concourse/pool-resource/pull/50#issuecomment-551940314 Signed-off-by: Sean M. Collins --- assets/in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/in b/assets/in index d1ee0ea..18274e0 100755 --- a/assets/in +++ b/assets/in @@ -39,7 +39,7 @@ uri=$(jq -r '.source.uri // ""' < $payload) branch=$(jq -r '.source.branch // ""' < $payload) pool_name=$(jq -r '.source.pool // ""' < $payload) ref=$(jq -r '.version.ref // "HEAD"' < $payload) -depth=$(jq -r '(.params.depth // 0)' < $payload) +depth=$(jq -r '(.params.depth // 1)' < $payload) if [ -z "$uri" ]; then config_errors="${config_errors}invalid payload (missing uri)\n" @@ -63,8 +63,8 @@ if [ -n "$branch" ]; then branchflag="--branch $branch" fi -depthflag="" -if test "$depth" -gt 0 2> /dev/null; then +depthflag="--depth 1" +if test "$depth" -ne 1 2> /dev/null; then depthflag="--depth $depth" fi