From 101f35bae02bf1c0e707bf41052418850debdcbe Mon Sep 17 00:00:00 2001 From: Rezzo Date: Thu, 23 Nov 2023 22:30:54 +0000 Subject: [PATCH] not interested in the news, cheers --- build-tools/update | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/build-tools/update b/build-tools/update index 75a64da1a..dbad45bb5 100755 --- a/build-tools/update +++ b/build-tools/update @@ -179,28 +179,7 @@ crossprotocolContents = crossprotocolContents.replace(URL_REGEX, addCachebuster) let replayEmbedContents = fs.readFileSync('play.pokemonshowdown.com/js/replay-embed.template.js', {encoding: 'utf8'}); replayEmbedContents = replayEmbedContents.replace(/play\.pokemonshowdown\.com/g, routes.client); -// add news, only if it's actually likely to exist -process.stdout.write("and news... "); -let stdout = ''; -let newsid = 0; -let news = '[failed to retrieve news]'; -try { - stdout = child_process.execSync('php ' + path.resolve(thisDir, 'news-embed.php')); -} catch (e) { - console.log("git hook failed to retrieve news (exec command failed):\n" + (e.error + e.stderr + e.stdout)); -} -try { - if (stdout) [newsid, news] = JSON.parse(stdout); -} catch (e) { - console.log("git hook failed to retrieve news (parsing JSON failed):\n" + e.stack); -} - -indexContents = indexContents.replace(//g, newsid); -indexContents = indexContents.replace(//g, news); - -try { - indexContents = indexContents.replace(//g, '' + fs.readFileSync('config/head-custom.html')); -} catch (e) {} +// Nobody cares about the news. Cheers. fs.writeFileSync('play.pokemonshowdown.com/index.html', indexContents); fs.writeFileSync('play.pokemonshowdown.com/preactalpha.html', preactIndexContents);