From 1fedd68a52dc0742d17f103968cdb9754430599b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Tue, 21 Jul 2026 18:32:52 +0800 Subject: [PATCH] fix: build.sh password_key sync preserves config; add tmpl processor --- build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 7b73bae..8311b1c 100755 --- a/build.sh +++ b/build.sh @@ -74,15 +74,15 @@ if [ -d wwwroot/knowledge_bases_list ]; then find wwwroot -name '*.dspy' -exec sed -i "s/ns\['created_by'\] = ''/ns['created_by'] = userorgid/" {} \; 2>/dev/null || true fi -# Sync password_key from Sage if available +# Sync password_key from Sage if available (only update key, preserve rest) if [ -f /d/apitest/sage/conf/config.json ]; then sage_key=$(python3 -c "import json; print(json.load(open('/d/apitest/sage/conf/config.json'))['password_key'])") python3 -c " import json c = json.load(open('$cdir/conf/config.json')) c['password_key'] = '$sage_key' -json.dump(c, open('$cdir/conf/config.json', 'w'), indent=4) -" +json.dump(c, open('$cdir/conf/config.json', 'w'), indent=4, ensure_ascii=False) +" 2>/dev/null echo "password_key synced from Sage" fi