diff --git a/bash/functions/pipelines/full_git_push.sh b/bash/functions/pipelines/full_git_push.sh index 93f69a20..546ce0dc 100644 --- a/bash/functions/pipelines/full_git_push.sh +++ b/bash/functions/pipelines/full_git_push.sh @@ -52,8 +52,15 @@ full_git_push() { [[ -z "$dir_path" ]] && continue local d="$registry_root/$dir_path" [[ -d "$d" ]] || continue - [[ -d "$d/.git" ]] && continue - echo " auto-init: $d" >&2 + # Skip solo si ya tiene .git CON remote origin. Un .git sin origin + # (init local que nunca llego a crear repo Gitea) cae a push step y + # falla con "'origin' does not appear to be a git repository". + if [[ -d "$d/.git" ]]; then + git -C "$d" remote get-url origin >/dev/null 2>&1 && continue + echo " fix-remote: $d (.git sin origin)" >&2 + else + echo " auto-init: $d" >&2 + fi ensure_repo_synced "$d" dataforge "$(basename "$d")" master "chore: initial sync" || \ echo " [warn] fallo inicializando $d" >&2 done < <(sqlite3 "$registry_root/registry.db" "SELECT dir_path FROM apps WHERE dir_path != '' UNION SELECT dir_path FROM analysis WHERE dir_path != '';" 2>/dev/null)