-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathbuild_command.dart
More file actions
35 lines (28 loc) · 1.05 KB
/
build_command.dart
File metadata and controls
35 lines (28 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import 'package:celest_cli/src/commands/auth/authenticate.dart';
import 'package:celest_cli/src/commands/celest_command.dart';
import 'package:celest_cli/src/context.dart';
import 'package:celest_cli/src/frontend/celest_frontend.dart';
import 'package:celest_cli/src/init/project_init.dart';
import 'package:celest_cli/src/init/project_migrate.dart';
import 'package:mason_logger/src/mason_logger.dart';
final class BuildCommand extends CelestCommand
with Configure, Migrate, Authenticate {
@override
String get name => 'build';
@override
String get description => 'Builds your Celest project for hosting.';
@override
String get category => 'Project';
@override
Progress? currentProgress;
@override
Future<int> run() async {
await super.run();
final needsMigration = await configure();
return CelestFrontend(stopSignal: stopSignal).build(
migrateProject: needsMigration,
currentProgress: cliLogger.progress('Building project'),
environmentId: 'production', // TODO(dnys1): Allow setting environment
);
}
}