-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdeploy_command.dart
More file actions
35 lines (27 loc) · 977 Bytes
/
deploy_command.dart
File metadata and controls
35 lines (27 loc) · 977 Bytes
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/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 DeployCommand extends CelestCommand
with Configure, Migrate, Authenticate {
@override
String get name => 'deploy';
@override
String get description => 'Deploys your Celest project to the cloud.';
@override
String get category => 'Project';
@override
Progress? currentProgress;
@override
Future<int> run() async {
await super.run();
final needsMigration = await configure();
if (await authenticate() case final code when code != 0) {
return code;
}
return CelestFrontend(stopSignal: stopSignal)
.deploy(migrateProject: needsMigration);
}
}