fix(build): auto-sync config from Sage (password_key + sage DB)

This commit is contained in:
yumoqing 2026-07-18 23:24:47 +08:00
parent d2a3f216dc
commit 495bbb1422

View File

@ -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