1
1
part of '../instabug.dart' ;
2
2
3
- /**
4
- * This script uploads .so files to the specified endpoint used in NDK crash reporting.
5
- * Usage: dart run instabug_flutter:instabug upload-so-files --arch <arch> --file <path> --api_key <key> --token <token> --name <name>
6
- */
7
-
8
3
class UploadSoFilesOptions {
9
4
final String arch;
10
5
final String file;
@@ -22,6 +17,8 @@ class UploadSoFilesOptions {
22
17
}
23
18
24
19
// ignore: avoid_classes_with_only_static_members
20
+ /// This script uploads .so files to the specified endpoint used in NDK crash reporting.
21
+ /// Usage: dart run instabug_flutter:instabug upload-so-files --arch \<arch\> --file \<path\> --api_key \<key\> --token \<token\> --name \<name\>
25
22
class UploadSoFilesCommand {
26
23
static const List <String > validArchs = [
27
24
'x86' ,
@@ -91,16 +88,19 @@ class UploadSoFilesCommand {
91
88
// validate file is a zip file
92
89
if (! file.path.endsWith ('.zip' )) {
93
90
stderr.writeln (
94
- '[Instabug-CLI] Error: File is not a zip file: ${options .file }' );
91
+ '[Instabug-CLI] Error: File is not a zip file: ${options .file }' ,
92
+ );
95
93
throw Exception ('File is not a zip file: ${options .file }' );
96
94
}
97
95
98
96
// Validate architecture
99
97
if (! validArchs.contains (options.arch)) {
100
98
stderr.writeln (
101
- '[Instabug-CLI] Error: Invalid architecture: ${options .arch }. Valid options: ${validArchs .join (', ' )}' );
99
+ '[Instabug-CLI] Error: Invalid architecture: ${options .arch }. Valid options: ${validArchs .join (', ' )}' ,
100
+ );
102
101
throw Exception (
103
- 'Invalid architecture: ${options .arch }. Valid options: ${validArchs .join (', ' )}' );
102
+ 'Invalid architecture: ${options .arch }. Valid options: ${validArchs .join (', ' )}' ,
103
+ );
104
104
}
105
105
106
106
stdout.writeln ('Uploading .so files...' );
@@ -141,7 +141,8 @@ class UploadSoFilesCommand {
141
141
}
142
142
143
143
stdout.writeln (
144
- 'Successfully uploaded .so files for version: ${options .name } with arch ${options .arch }' );
144
+ 'Successfully uploaded .so files for version: ${options .name } with arch ${options .arch }' ,
145
+ );
145
146
exit (0 );
146
147
} catch (e) {
147
148
stderr.writeln ('[Instabug-CLI] Error uploading .so files, $e ' );
0 commit comments