mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-18 14:48:55 +02:00
fix: avoid tag fetch for main installer ref
This commit is contained in:
committed by
Peter Steinberger
parent
f12e9c41fa
commit
0d22fbf312
@@ -1960,16 +1960,17 @@ checkout_git_openclaw_ref() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
run_quiet_step "Fetching requested version" git -C "$repo_dir" fetch --tags origin
|
||||
|
||||
if [[ "$ref" == "main" ]]; then
|
||||
run_quiet_step "Fetching requested version" git -C "$repo_dir" fetch --no-tags origin main
|
||||
run_quiet_step "Checking out main" git -C "$repo_dir" checkout main
|
||||
if [[ "$GIT_UPDATE" == "1" ]]; then
|
||||
run_quiet_step "Updating repository" git -C "$repo_dir" pull --rebase || true
|
||||
run_quiet_step "Updating repository" git -C "$repo_dir" pull --rebase --no-tags || true
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
|
||||
run_quiet_step "Fetching requested version" git -C "$repo_dir" fetch --tags origin
|
||||
|
||||
if git -C "$repo_dir" rev-parse --verify --quiet "refs/tags/${ref}^{commit}" >/dev/null; then
|
||||
run_quiet_step "Checking out ${ref}" git -C "$repo_dir" checkout --detach "$ref"
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user