unity-builder/cli/commands/command/build-command.ts

24 lines
643 B
TypeScript
Raw Normal View History

2022-04-23 21:17:35 +00:00
import { CommandInterface } from './CommandInterface.ts';
2022-04-14 23:53:25 +00:00
import { exec, OutputMode } from 'https://deno.land/x/exec@0.0.5/mod.ts';
2022-04-23 21:17:35 +00:00
import { Options } from '../../config/options.ts';
2022-04-14 23:53:25 +00:00
2022-04-23 21:17:35 +00:00
export class BuildCommand implements CommandInterface {
public readonly name: string;
2022-04-14 23:53:25 +00:00
2022-04-23 21:17:35 +00:00
constructor(name: string) {
this.name = name;
2022-04-14 23:53:25 +00:00
}
2022-04-23 21:17:35 +00:00
public async execute(options: Options) {
2022-04-14 23:53:25 +00:00
const result = await exec('docker run -it unityci/editor:2020.3.15f2-base-1 /bin/bash -c "echo test"', {
output: OutputMode.Capture,
continueOnError: true,
// verbose: true,
});
2022-04-23 21:17:35 +00:00
console.log(options);
2022-04-14 23:53:25 +00:00
console.log(result.output);
}
}