01042bc23c
Nuevas funciones bash: gestión Gitea (create_repo, list_repos, add_collaborator, push_directory), install_android_sdk, install_mantine, frontend_doctor. Pipelines: capacitor_build_apk y gitea_init_app. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.1 KiB
2.1 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | params | output | tested | tests | test_file_path | file_path | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| gitea_push_directory | function | bash | infra | 1.0.0 | impure | gitea_push_directory(directory: string, owner: string, repo: string, branch: string) -> void | Inicializa git en un directorio local y lo sube a un repositorio Gitea existente. Si el directorio ya tiene .git, actualiza el remote y pushea cambios pendientes. Protege registry.db añadiéndolo al .gitignore antes del commit. |
|
false | error_go_core |
|
vacío — efectos observables en el repositorio Gitea destino | false | bash/functions/infra/gitea_push_directory.sh |
Ejemplo
source bash/functions/infra/gitea_push_directory.sh
export GITEA_URL="https://git.example.com"
export GITEA_TOKEN="$(pass agentes/dataforge-token)"
# Subir directorio a repo existente
gitea_push_directory "/home/lucas/myproject" "myorg" "my-app"
# Subir a rama específica
gitea_push_directory "/home/lucas/myproject" "myorg" "my-app" "develop"
Notas
- Requiere
GITEA_URLyGITEA_TOKENseteadas. - El token se embebe en la URL del remote para autenticación (nunca se imprime a stdout/stderr, se enmascara con ***).
- Si
registry.dbexiste en el directorio, se añade automáticamente al.gitignorelocal. - Si el
.gitya existe con un remote diferente, se redirige al repo indicado sin perder el historial local. - Usa
--force-with-leasepara el primer push y fallback a push normal (para repos vacíos recién creados). - El commit se firma con
agent@fn-registrysi no hay configuración git en el entorno.