mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
feat: neater code
This commit is contained in:
1 parent
382f04229e
commit
4180736d37
1 file changed
+3
-4
@@ -8,11 +8,10 @@ import { FileChange } from '../core/github/commitMultipleFiles';
|
|||||||
export async function tankIcons() {
|
export async function tankIcons() {
|
||||||
console.log('Building tank icons...');
|
console.log('Building tank icons...');
|
||||||
|
|
||||||
const websiteProcess = exec('cd ../.. && bun dev:website');
|
const child = exec('cd ../.. && bun dev:website');
|
||||||
const browser = await launch();
|
const browser = await launch();
|
||||||
const page = await browser.newPage();
|
const page = await browser.newPage();
|
||||||
const tankDefinitions = await fetchTankDefinitions();
|
const tanks = Object.values(await fetchTankDefinitions());
|
||||||
const tanks = Object.values(tankDefinitions.tanks);
|
|
||||||
const files: FileChange[] = [];
|
const files: FileChange[] = [];
|
||||||
|
|
||||||
let index = 0;
|
let index = 0;
|
||||||
@@ -38,7 +37,7 @@ export async function tankIcons() {
|
|||||||
files.push({ path: `icons/tanks/blitzkit/${id}.webp`, content });
|
files.push({ path: `icons/tanks/blitzkit/${id}.webp`, content });
|
||||||
}
|
}
|
||||||
|
|
||||||
websiteProcess.kill('SIGHUP');
|
child.kill('SIGHUP');
|
||||||
await browser.close();
|
await browser.close();
|
||||||
|
|
||||||
await commitAssets('tank icons', files);
|
await commitAssets('tank icons', files);
|
||||||
|
|||||||
Reference in new issue
Block a user