From 495bbb14228d0162a05dc4fea5370462f30a24f5 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 18 Jul 2026 23:24:47 +0800 Subject: [PATCH] fix(build): auto-sync config from Sage (password_key + sage DB) --- build.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 96ab9f9..4233d11 100644 --- a/build.sh +++ b/build.sh @@ -88,7 +88,20 @@ done # pipeline_task has no separate module mkdir -p wwwroot/pipeline_task -# 9. Create runtime dirs +# 9. Sync config from Sage (password_key + sage DB credentials) +if [ -f /d/apitest/sage/conf/config.json ]; then + python3 -c " +import json +cs=json.load(open('/d/apitest/sage/conf/config.json')) +c=json.load(open('$cdir/conf/config.json')) +c['password_key']=cs.get('password_key','') +c['databases']['sage']=cs['databases']['sage'] +json.dump(c,open('$cdir/conf/config.json','w'),ensure_ascii=False,indent=2) +print(' config: synced password_key + sage DB') +" +fi + +# 10. Create runtime dirs mkdir -p "$cdir/logs" "$cdir/files" "$cdir/conf" # 6. Fix auto-assign created_by in CRUD dspys (xls2ui overwritten) for d in sd_projects sd_iterations; do