feat: added ratings leaderboard generation and publication

This commit is contained in:
TresAbhi committed 2023-07-14 01:32:20 +00:00
1 parent 098e6c09b9
commit 6d9e6973d5
35 files changed
+412 -84

No files matched your search

+12 -12
View File
@@ -4,22 +4,22 @@ import { argv } from 'process';
const isProd = !argv.includes('--dev');
const buildAll = argv.includes('--build=all');
const buildBot = argv.includes('--build=bot') | buildAll;
const buildServer = argv.includes('--build=server') | buildAll;
const buildBot = argv.includes('--build=bot') || buildAll;
const buildServer = argv.includes('--build=server') || buildAll;
if (isProd) {
// only remove in production to ensure no time is wasted in dev
console.log('🟡 Removing dist...');
console.log('Removing dist...');
await rm('dist', { recursive: true, force: true });
console.log('✅ Dist removed');
console.log('Dist removed');
console.log('🟡 Creating dist...');
console.log('Creating dist...');
await mkdir('dist');
console.log('✅ Dist created');
console.log('Dist created');
console.log('🟡 Copying package.json...');
console.log('Copying package.json...');
copyFile('package.dist.json', 'dist/package.json').then(() =>
console.log('✅ package.json copied'),
console.log('package.json copied'),
);
}
@@ -40,25 +40,25 @@ const commonOptions = {
};
if (buildBot) {
console.log('🟡 Building bot...');
console.log('Building bot...');
build({
...commonOptions,
entryPoints: ['src/bot.ts'],
outfile: 'dist/bot.cjs',
}).then(() => {
console.log('✅ Bot built');
console.log('Bot built');
});
}
if (buildServer) {
console.log('🟡 Building server...');
console.log('Building server...');
build({
...commonOptions,
entryPoints: ['src/server.ts'],
outfile: 'dist/server.cjs',
}).then(() => {
console.log('✅ Server built');
console.log('Server built');
});
}