Compare commits
1 Commits
main
...
claude/evo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09fe90b4db |
@ -286,10 +286,13 @@ git_fetch_and_checkout() {
|
||||
log "previous HEAD: $previous_sha"
|
||||
log "fetching $EVO_GIT_REMOTE…"
|
||||
run git -C "$EVO_DEPLOY_DIR" fetch "$EVO_GIT_REMOTE" --prune >&2
|
||||
if git -C "$EVO_DEPLOY_DIR" rev-parse --verify "${EVO_DEPLOY_REF}^{commit}" >/dev/null 2>&1; then
|
||||
target_sha="$(git -C "$EVO_DEPLOY_DIR" rev-parse "${EVO_DEPLOY_REF}^{commit}")"
|
||||
elif git -C "$EVO_DEPLOY_DIR" rev-parse --verify "${EVO_GIT_REMOTE}/${EVO_DEPLOY_REF}^{commit}" >/dev/null 2>&1; then
|
||||
# Prefer the freshly fetched remote branch: the local `main` in the deploy
|
||||
# checkout never moves (we reset HEAD, not the branch), so resolving it first
|
||||
# would redeploy a stale commit.
|
||||
if git -C "$EVO_DEPLOY_DIR" rev-parse --verify "${EVO_GIT_REMOTE}/${EVO_DEPLOY_REF}^{commit}" >/dev/null 2>&1; then
|
||||
target_sha="$(git -C "$EVO_DEPLOY_DIR" rev-parse "${EVO_GIT_REMOTE}/${EVO_DEPLOY_REF}^{commit}")"
|
||||
elif git -C "$EVO_DEPLOY_DIR" rev-parse --verify "${EVO_DEPLOY_REF}^{commit}" >/dev/null 2>&1; then
|
||||
target_sha="$(git -C "$EVO_DEPLOY_DIR" rev-parse "${EVO_DEPLOY_REF}^{commit}")"
|
||||
else
|
||||
die "cannot resolve ref: $EVO_DEPLOY_REF"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user