feat: Introduce a new upgrade command and enhance built-in tool settings with provider and model configuration.

This commit is contained in:
viettranx committed 2026-02-27 11:38:04 +07:00
1 parent d65d792646
commit 86d58e1021
23 files changed
+1195 -170

No files matched your search

+8 -4
View File
@@ -3,14 +3,18 @@ set -e
case "${1:-serve}" in
serve)
# Managed mode: auto-run migrations before starting
# Managed mode: auto-upgrade (schema migrations + data hooks) before starting.
if [ "$GOCLAW_MODE" = "managed" ] && [ -n "$GOCLAW_POSTGRES_DSN" ]; then
echo "Managed mode: running migrations..."
/app/goclaw migrate up --migrations-dir "$GOCLAW_MIGRATIONS_DIR" || \
echo "Migration warning (may already be up-to-date)"
echo "Managed mode: running upgrade..."
/app/goclaw upgrade || \
echo "Upgrade warning (may already be up-to-date)"
fi
exec /app/goclaw
;;
upgrade)
shift
exec /app/goclaw upgrade "$@"
;;
migrate)
shift
exec /app/goclaw migrate "$@"