unity-builder/src/index.ts

20 lines
444 B
TypeScript
Raw Normal View History

2022-08-27 22:57:51 +00:00
import { Cli } from './cli.ts';
2022-08-07 23:51:36 +00:00
2022-08-27 22:57:51 +00:00
class GameCI {
public static async run() {
2022-08-07 23:51:36 +00:00
try {
2022-08-27 22:57:51 +00:00
const { command, options } = await new Cli().validateAndParseArguments();
2022-08-27 22:57:51 +00:00
const success = await command.execute(options);
2022-08-07 23:51:36 +00:00
2022-08-31 20:20:38 +00:00
if (!success) log.warning(`${command.constructor.name} failed.`);
2022-08-07 23:51:36 +00:00
} catch (error) {
// eslint-disable-next-line no-console
console.error(error);
2022-08-07 23:51:36 +00:00
Deno.exit(1);
}
}
}
2022-06-07 21:59:34 +00:00
2022-08-27 22:57:51 +00:00
await GameCI.run();