mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-17 22:14:14 +00:00
feat: Introduce a new upgrade command and enhance built-in tool settings with provider and model configuration.
This commit is contained in:
1 parent
d65d792646
commit
86d58e1021
23 files changed
+1195
-170
No files matched your search
@@ -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 "$@"
|
||||
|
||||
Reference in new issue
Block a user