11part of '../instabug.dart' ;
22
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-
83class UploadSoFilesOptions {
94 final String arch;
105 final String file;
@@ -22,6 +17,8 @@ class UploadSoFilesOptions {
2217}
2318
2419// 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\>
2522class UploadSoFilesCommand {
2623 static const List <String > validArchs = [
2724 'x86' ,
@@ -91,16 +88,19 @@ class UploadSoFilesCommand {
9188 // validate file is a zip file
9289 if (! file.path.endsWith ('.zip' )) {
9390 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+ );
9593 throw Exception ('File is not a zip file: ${options .file }' );
9694 }
9795
9896 // Validate architecture
9997 if (! validArchs.contains (options.arch)) {
10098 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+ );
102101 throw Exception (
103- 'Invalid architecture: ${options .arch }. Valid options: ${validArchs .join (', ' )}' );
102+ 'Invalid architecture: ${options .arch }. Valid options: ${validArchs .join (', ' )}' ,
103+ );
104104 }
105105
106106 stdout.writeln ('Uploading .so files...' );
@@ -141,7 +141,8 @@ class UploadSoFilesCommand {
141141 }
142142
143143 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+ );
145146 exit (0 );
146147 } catch (e) {
147148 stderr.writeln ('[Instabug-CLI] Error uploading .so files, $e ' );
0 commit comments