업데이트 오류 수정
This commit is contained in:
@@ -11,6 +11,8 @@ BUILD_INFO="${WORK_TREE}/dist-desktop/build-info.json"
|
||||
RELEASE_DIR="${GC_DESKTOP_APP_RELEASE_DIR:-$WORK_TREE/data/desktop-releases}"
|
||||
|
||||
PUBLISHED_LATEST_URL="${DESKTOP_PUBLISHED_LATEST_URL:-${DESKTOP_UPDATE_BASE_URL:-https://stock.exdev.co.kr/desktop/updates}/latest.json}"
|
||||
PUBLISHED_LATEST_URL="${PUBLISHED_LATEST_URL/http:\/\/exdev.co.kr/https://stock.exdev.co.kr}"
|
||||
PUBLISHED_LATEST_URL="${PUBLISHED_LATEST_URL/https:\/\/exdev.co.kr/https://stock.exdev.co.kr}"
|
||||
REMOTE_PUB_VER=""
|
||||
if REMOTE_JSON="$(curl -sf --connect-timeout 5 --max-time 12 "$PUBLISHED_LATEST_URL" 2>/dev/null)"; then
|
||||
REMOTE_PUB_VER="$(printf '%s' "$REMOTE_JSON" | node -e "
|
||||
|
||||
@@ -86,7 +86,10 @@ function addPlatform(platformKey, bundleName) {
|
||||
}
|
||||
}
|
||||
platforms[platformKey] = {
|
||||
url: `${baseUrl}/${encodeURIComponent(bundleName)}`,
|
||||
url: `${baseUrl}/${encodeURIComponent(bundleName)}`.replace(
|
||||
/^https:\/\/exdev\.co\.kr/i,
|
||||
'https://stock.exdev.co.kr',
|
||||
),
|
||||
signature,
|
||||
bundleVersion: effectiveVersion,
|
||||
};
|
||||
|
||||
@@ -27,7 +27,9 @@ conf.bundle.createUpdaterArtifacts = enable;
|
||||
conf.plugins = conf.plugins || {};
|
||||
conf.plugins.updater = conf.plugins.updater || {};
|
||||
conf.plugins.updater.endpoints = (conf.plugins.updater.endpoints || [])
|
||||
.map((u) => String(u).replace(/^http:\\/\\/exdev\\.co\\.kr\\//, 'https://stock.exdev.co.kr/'));
|
||||
.map((u) => String(u)
|
||||
.replace(/^http:\\/\\/exdev\\.co\\.kr\\//, 'https://stock.exdev.co.kr/')
|
||||
.replace(/^https:\\/\\/exdev\\.co\\.kr\\//, 'https://stock.exdev.co.kr/'));
|
||||
if (!conf.plugins.updater.endpoints.length) {
|
||||
conf.plugins.updater.endpoints = ['https://stock.exdev.co.kr/desktop/updates/latest.json'];
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ UPDATES_DIR="${UPDATES_DIR:-$WORK_TREE/frontend/public/desktop/updates}"
|
||||
WEB_STATIC_DIR="${WEB_STATIC_DIR:-$UPDATES_DIR}"
|
||||
BASE_URL="${DESKTOP_UPDATE_BASE_URL:-https://stock.exdev.co.kr/desktop/updates}"
|
||||
BASE_URL="${BASE_URL/http:\/\//https:\/\/}"
|
||||
BASE_URL="${BASE_URL/https:\/\/exdev.co.kr/https:\/\/stock.exdev.co.kr}"
|
||||
DESKTOP_RELEASE_DIR="${GC_DESKTOP_APP_RELEASE_DIR:-$WORK_TREE/data/desktop-releases}"
|
||||
KEY_PATH="${TAURI_SIGNER_KEY:-$HOME/.tauri/goldenchart.key}"
|
||||
DESKTOP_DIR="$WORK_TREE/desktop"
|
||||
@@ -186,7 +187,20 @@ node "$WORK_TREE/scripts/ensure-desktop-latest-json.mjs" \
|
||||
exit 1
|
||||
}
|
||||
|
||||
LATEST_SIZE="$(wc -c < "$PUBLISH_UPDATES/latest.json" | tr -d ' ')"
|
||||
LATEST_PATH="$PUBLISH_UPDATES/latest.json"
|
||||
node -e "
|
||||
const fs=require('fs'); const p=process.argv[1];
|
||||
const j=JSON.parse(fs.readFileSync(p,'utf8'));
|
||||
for (const k of Object.keys(j.platforms||{})) {
|
||||
const u=j.platforms[k]?.url;
|
||||
if (typeof u==='string' && /exdev\\.co\\.kr/i.test(u)) {
|
||||
j.platforms[k].url=u.replace(/^https:\\/\\/exdev\\.co\\.kr/i,'https://stock.exdev.co.kr');
|
||||
}
|
||||
}
|
||||
fs.writeFileSync(p, JSON.stringify(j,null,2)+'\\n');
|
||||
" "$LATEST_PATH"
|
||||
|
||||
LATEST_SIZE="$(wc -c < "$LATEST_PATH" | tr -d ' ')"
|
||||
if [[ "${LATEST_SIZE:-0}" -lt 8 ]]; then
|
||||
log "ERROR: latest.json is empty (${LATEST_SIZE} bytes)" >&2
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user