diff --git a/j_updateServer.php b/j_updateServer.php index f6eb58c4..04335b8a 100644 --- a/j_updateServer.php +++ b/j_updateServer.php @@ -29,7 +29,15 @@ function getHash($target = 'HEAD') } function genJS($server){ - exec(sprintf("./node_modules/.bin/webpack build --env target=%s", escapeshellarg($server))); + $command = sprintf("./node_modules/.bin/webpack build --env target=%s", escapeshellarg($server)); + + exec(($command), $output, $result_code); + if($result_code!=0){ + Json::die([ + 'result' => false, + 'reason'=>$output + ]); + } } $session = Session::requireLogin(null)->setReadOnly(); @@ -157,14 +165,14 @@ if ($server == $baseServerName) { } + $version = getVersion(); + $gitHash = getHash(); if ( hash_file("sha256", __DIR__ . '/' . $server . '/d_setting/VersionGit.dynamic.orig.php') == hash_file("sha256", __DIR__ . '/' . $server . '/d_setting/VersionGit.php')) { $result = true; } else{ - $version = getVersion(); - $hash = getHash(); $result = Util::generateFileUsingSimpleTemplate( __DIR__ . '/' . $server . '/d_setting/VersionGit.orig.php', __DIR__ . '/' . $server . '/d_setting/VersionGit.php', @@ -211,6 +219,7 @@ if ($server == $baseServerName) { 'server' => $server, 'result' => true, 'version' => $version, + 'hash' => $gitHash, 'imgResult' => $imgResult, 'imgDetail' => $imgDetail, ]); @@ -263,5 +272,7 @@ opcache_reset(); Json::die([ 'server' => $server, 'result' => true, - 'version' => $version + 'version' => $version, + 'hash' => $gitHash, + 'imgResult' => false, ]); diff --git a/webpack.config.js b/webpack.config.js index 9536c0b6..f2b27e43 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -15,21 +15,21 @@ module.exports = (env) => { } }, entry: { - chiefCenter: `${target}/ts/chiefCenter.ts`, - inheritPoint: `${target}/ts/inheritPoint.ts`, - common: `${target}/ts/common_deprecated.ts`, - troop: `${target}/ts/troop.ts`, - map: `${target}/ts/map.ts`, - install_db: `${target}/ts/install_db.ts`, - install: `${target}/ts/install.ts`, - battle_simulator: `${target}/ts/battle_simulator.ts`, - recent_map: `${target}/ts/recent_map.ts`, - processing: `${target}/ts/processing.ts`, - select_npc: `${target}/ts/select_npc.ts`, - betting: `${target}/ts/betting.ts`, - board: `${target}/ts/board.ts`, - bossInfo: `${target}/ts/bossInfo.ts`, - myPage: `${target}/ts/myPage.ts`, + chiefCenter: '@/chiefCenter.ts', + inheritPoint: '@/inheritPoint.ts', + common: '@/common_deprecated.ts', + troop: '@/troop.ts', + map: '@/map.ts', + install_db: '@/install_db.ts', + install: '@/install.ts', + battle_simulator: '@/battle_simulator.ts', + recent_map: '@/recent_map.ts', + processing: '@/processing.ts', + select_npc: '@/select_npc.ts', + betting: '@/betting.ts', + board: '@/board.ts', + bossInfo: '@/bossInfo.ts', + myPage: '@/myPage.ts', //FORM 입력용, frontend 변경후 제거