fix: Desktop publish가 build-info 버전을 tauri.conf로 덮어쓰지 않음

CI bump(0.1.7) 후 deploy checkout으로 tauri.conf가 0.1.4로 돌아가도
latest.json에 올바른 빌드 버전이 반영되도록 한다.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-14 17:26:35 +09:00
parent 7a77e1afb9
commit 7f5e7b22d2
2 changed files with 13 additions and 21 deletions
+4 -13
View File
@@ -17,19 +17,10 @@ fi
VERSION="$(node -p "require('$CONF').version" 2>/dev/null || echo '0.1.0')"
BUILD_INFO="$UPDATES_DIR/build-info.json"
if [[ -f "$BUILD_INFO" ]]; then
VERSION="$(node <<NODE
const fs = require('fs');
const cmp = (a, b) => {
const pa = a.split('.').map(Number), pb = b.split('.').map(Number);
for (let i = 0; i < 3; i++) { const d = (pa[i]||0)-(pb[i]||0); if (d) return d; }
return 0;
};
const confV = '$VERSION';
let biV = confV;
try { biV = JSON.parse(fs.readFileSync('$BUILD_INFO', 'utf8')).version || confV; } catch {}
console.log(cmp(biV, confV) > 0 ? biV : confV);
NODE
)"
BI_VER="$(node -e "try{console.log(JSON.parse(require('fs').readFileSync(process.argv[1],'utf8')).version||'')}catch{}" "$BUILD_INFO" 2>/dev/null || true)"
if [[ -n "$BI_VER" ]]; then
VERSION="$BI_VER"
fi
fi
# dmg/exe 설치 파일명 버전은 manifest에 반영하지 않음 (updater tar.gz/exe와 불일치 시 루프 유발)
NOTES="${DESKTOP_RELEASE_NOTES:-GoldenChart Desktop $VERSION}"