Skip to content

Commit

Permalink
Make depth of 1 to be the default
Browse files Browse the repository at this point in the history
Based on concourse#50 (comment)

Signed-off-by: Sean M. Collins <[email protected]>
  • Loading branch information
sc68cal committed May 18, 2020
1 parent df77259 commit 9c52ce8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/in
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down

0 comments on commit 9c52ce8

Please sign in to comment.