initial commit

This commit is contained in:
Brad Rydzewski
2018-08-08 14:43:53 -07:00
commit 0f4c512f91
17 changed files with 686 additions and 0 deletions

17
posix/clone-commit Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
FLAGS=""
if [[ ! -z "${PLUGIN_DEPTH}" ]]; then
FLAGS="--depth=${PLUGIN_DEPTH}"
fi
if [ ! -d .git ]; then
git init
git remote add origin ${DRONE_REMOTE_URL}
fi
set -e
set -x
git fetch ${FLAGS} origin +refs/heads/${DRONE_COMMIT_BRANCH}:
git checkout ${DRONE_COMMIT_SHA} -b ${DRONE_COMMIT_BRANCH}