From b98c99fe72bc874b90237607d74fc3261daf346c Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Sun, 11 Oct 2020 10:39:47 +0000 Subject: [PATCH] bugfix: git clone correct branch --- examples/git.rootprojects.org/root/gitdeploy/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/git.rootprojects.org/root/gitdeploy/deploy.sh b/examples/git.rootprojects.org/root/gitdeploy/deploy.sh index cb52461..11662f3 100644 --- a/examples/git.rootprojects.org/root/gitdeploy/deploy.sh +++ b/examples/git.rootprojects.org/root/gitdeploy/deploy.sh @@ -12,7 +12,7 @@ echo "Deploying ${GIT_REPO_ID}#${GIT_REF_NAME} ..." # See the Git Credentials Cheat Sheet # https://coolaj86.com/articles/vanilla-devops-git-credentials-cheatsheet/ my_tmp="$(mktemp -d -t "tmp.XXXXXXXXXX")" -git clone --depth=1 "${GIT_CLONE_URL}" "${my_tmp}/${GIT_REPO_NAME}" +git clone --depth=1 "${GIT_CLONE_URL}" -b "${GIT_REF_NAME}" "${my_tmp}/${GIT_REPO_NAME}" pushd "${my_tmp}/${GIT_REPO_NAME}/" go generate -mod=vendor ./... go build -mod=vendor .