버전 관리 시스템 최종 안정화: 프론트엔드 버전 표시 로직 보완

This commit is contained in:
choibk 2026-01-25 00:52:02 +09:00
parent c91a286ffe
commit 7dbfeee3f6
2 changed files with 7 additions and 3 deletions

View File

@ -545,7 +545,11 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res
const history = allTags.filter(t => compare(t.version, currentVersion) <= 0);
const latestFromRemote = allTags[0] || null;
const needsUpdate = latestFromRemote ? (compare(latestFromRemote.version, currentVersion) > 0) : false;
const compResult = latestFromRemote ? compare(latestFromRemote.version, currentVersion) : 0;
const needsUpdate = compResult > 0;
console.log(`[VersionCheck] Path: ${packageJsonPath}`);
console.log(`[VersionCheck] Current: "${currentVersion}", Latest: "${latestFromRemote?.version}", Comp: ${compResult}, NeedsUpdate: ${needsUpdate}`);
res.json({
current: currentVersion,
@ -553,7 +557,7 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res
needsUpdate: needsUpdate,
latestInfo: needsUpdate ? latestFromRemote : null,
history: history,
debug: { path: packageJsonPath }
debug: { path: packageJsonPath, compResult }
});
});
});

View File

@ -110,7 +110,7 @@ export function VersionPage() {
};
// Source of truth for versioning comes from the API
const currentVersion = remoteInfo?.current || '0.4.0';
const currentVersion = remoteInfo?.current || healthIcon?.version || '---';
const buildDate = '2026-01-25';
// Check if update is needed based on API-supplied needsUpdate flag