-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeployments_command.dart
More file actions
71 lines (66 loc) · 1.73 KB
/
deployments_command.dart
File metadata and controls
71 lines (66 loc) · 1.73 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import 'dart:io';
import 'package:args/args.dart';
import 'package:raygun_cli/deployments/deployments.dart';
const kDeploymentsCommand = 'deployments';
ArgParser buildParserDeployments() {
return ArgParser()
..addFlag(
'help',
abbr: 'h',
negatable: false,
help: 'Print deployments usage information',
)
..addOption(
'token',
help: 'Raygun access token',
)
..addOption(
'api-key',
mandatory: true,
help: 'API key from the Raygun account you are deploying to',
)
..addOption(
'version',
mandatory: true,
help:
'Version of the software you are deploying and want Raygun to know about',
)
..addOption(
'scm-type',
mandatory: false,
allowed: ['GitHub', 'Bitbucket', 'GitLab', 'AzureDevOps'],
help:
'Type of the source control management system you are deploying from - if provided, one of [GitHub, Bitbucket, GitLab, AzureDevOps]',
)
..addOption(
'scm-identifier',
mandatory: false,
help: 'Commit that this deployment is based on',
)
..addOption(
'owner-name',
mandatory: false,
help: 'Name of the person deploying the software',
)
..addOption(
'email-address',
mandatory: false,
help: 'Email address of the person deploying the software',
)
..addOption(
'comment',
mandatory: false,
help: 'Deployment comment',
);
}
void parseDeploymentsCommand(ArgResults command, bool verbose) {
if (command.wasParsed('help')) {
print('Usage: raygun-cli deployments <arguments>');
print(buildParserDeployments().usage);
exit(0);
}
Deployments(
command: command,
verbose: verbose,
).notify();
}