Skip to content

Commit

Permalink
Merge pull request #1 from brexhq/terence/v1
Browse files Browse the repository at this point in the history
add hook
  • Loading branch information
tkbrex authored Mar 29, 2021
2 parents adad71c + e3f3d06 commit 5455d49
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions hooks/pre-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -euo pipefail

echo "Running git-shallow-clone-buildkite-plugin -- pre-checkout"

DEPTH="${BUILDKITE_PLUGIN_GIT_SHALLOW_CLONE_DEPTH:-1}"
export BUILDKITE_GIT_CLONE_FLAGS="-v --depth ${DEPTH}"
#export BUILDKITE_GIT_FETCH_FLAGS="-v --prune --depth ${DEPTH}"

#export BUILDKITE_GIT_CLONE_FLAGS="-v --filter=blob:none"
9 changes: 9 additions & 0 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Git shallow clone
description: Sets git-clone and git-fetch flags to perform a shallow clone
author: https://github.com/vgrigoruk
requirements: ['git']
configuration:
properties:
depth:
type: number
additionalProperties: false

0 comments on commit 5455d49

Please sign in to comment.