fix: normal git commit checkout
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-10-01 21:10:17 +02:00
parent e5254617f6
commit 213960abc3
3 changed files with 148 additions and 2 deletions

View File

@ -37,9 +37,11 @@ fi
# fast-forward is not possible. Checkout the specified commit sha which must be
# part of the branch.
if [[ -n "${DRONE_COMMIT_BRANCH}" ]] && [[ -n "${DRONE_COMMIT_SHA}" ]]; then
GIT_CHECKOUT_ARGS="${GIT_CHECKOUT_ARGS} -b ${DRONE_COMMIT_SHA} -b refs/remotes/origin/${DRONE_COMMIT_BRANCH}"
GIT_CHECKOUT_ARGS="${GIT_CHECKOUT_ARGS} ${DRONE_COMMIT_SHA} -b refs/remotes/origin/${DRONE_COMMIT_BRANCH}"
GIT_FETCH_ARGS="${GIT_FETCH_ARGS} origin +refs/heads/${DRONE_COMMIT_BRANCH}:refs/remotes/origin/${DRONE_COMMIT_BRANCH}"
fi
git fetch ${GIT_FETCH_ARGS}
git checkout ${GIT_CHECKOUT_ARGS}
ls -la