From fcaaef72abf59aa4633b4584b075fa2044c9466b Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 9 Oct 2020 09:46:00 +0000 Subject: [PATCH] shallow clone, and cleanup --- examples/git.rootprojects.org/root/gitdeploy/deploy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/git.rootprojects.org/root/gitdeploy/deploy.sh b/examples/git.rootprojects.org/root/gitdeploy/deploy.sh index 7b22b69..7419864 100644 --- a/examples/git.rootprojects.org/root/gitdeploy/deploy.sh +++ b/examples/git.rootprojects.org/root/gitdeploy/deploy.sh @@ -10,7 +10,7 @@ fi echo "Deploying ${GIT_REPO_ID}#${GIT_REF_NAME} ..." my_tmp="$(mktemp -d -t "tmp.XXXXXXXXXX")" -git clone "${GIT_CLONE_URL}" "${my_tmp}/${GIT_REPO_NAME}" +git clone --depth=1 "${GIT_CLONE_URL}" "${my_tmp}/${GIT_REPO_NAME}" pushd "${my_tmp}/${GIT_REPO_NAME}/" go generate -mod=vendor ./... go build -mod=vendor . @@ -19,3 +19,5 @@ pushd "${my_tmp}/${GIT_REPO_NAME}/" sudo systemctl restart gitdeploy popd + +rm -rf "${my_tmp}/${GIT_REPO_NAME}/"