[FIX] Resolve path issues for Git in Dev and re-enable auto update check
This commit is contained in:
parent
ead5ff0fdf
commit
9f81c0d03e
23
server/.env1
23
server/.env1
@ -1,23 +0,0 @@
|
||||
# ==============================================
|
||||
# [Common Settings]
|
||||
# ==============================================
|
||||
DB_HOST=sokuree.com
|
||||
DB_USER=choibk
|
||||
DB_PASSWORD=^Ocean1472bk
|
||||
PORT=3005
|
||||
|
||||
# ==============================================
|
||||
# [Development Environment] - Local Windows
|
||||
# ==============================================
|
||||
# 로컬 개발용 DB (분리됨: sokuree_platform_dev)
|
||||
# DB_NAME=sokuree_platform_dev
|
||||
# DB_PORT=3307
|
||||
# Windows 환경 호환성 (tcp는 권한 오류 발생 가능)
|
||||
CCTV_TRANSPORT_OVERRIDE=auto
|
||||
|
||||
# ==============================================
|
||||
# [Production Environment] - Synology NAS
|
||||
# ==============================================
|
||||
DB_NAME=sokuree_platform_prod
|
||||
DB_PORT=3307
|
||||
|
||||
@ -509,7 +509,8 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res
|
||||
fetchCmd = `git fetch ${auth.url} --tags --force --prune`;
|
||||
}
|
||||
|
||||
exec(fetchCmd, (err, stdout, stderr) => {
|
||||
const projectRoot = path.join(__dirname, '../..');
|
||||
exec(fetchCmd, { cwd: projectRoot }, (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
console.error('Git fetch failed:', err);
|
||||
const sanitizedError = stderr.replace(/:[^@]+@/g, ':****@');
|
||||
@ -526,7 +527,7 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res
|
||||
const format = '%(refname:short)|%(contents:subject)|%(contents:body)|%(creatordate:iso8601)';
|
||||
const historyCmd = `git for-each-ref refs/tags --sort=-creatordate --format="${format}" --count=50`;
|
||||
|
||||
exec(historyCmd, (err, stdout, stderr) => {
|
||||
exec(historyCmd, { cwd: projectRoot }, (err, stdout, stderr) => {
|
||||
const lines = stdout ? stdout.trim().split('\n') : [];
|
||||
const allTags = lines.map(line => {
|
||||
const [tag, subject, body, date] = line.split('|');
|
||||
|
||||
@ -67,8 +67,7 @@ export function VersionPage() {
|
||||
|
||||
useEffect(() => {
|
||||
fetchVersion();
|
||||
// Removed fetchRemoteVersion from auto-load to prevent "automatic" sync feeling
|
||||
// fetchRemoteVersion();
|
||||
fetchRemoteVersion();
|
||||
}, []);
|
||||
|
||||
const handleUpdate = async () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user