@@ -60,6 +60,8 @@ class SentryDartPlugin {
6060 await _executeFinalizeRelease (release);
6161 } on ExitError catch (e) {
6262 return e.code;
63+ } finally {
64+ Log .tasksSummary ();
6365 }
6466 return 0 ;
6567 }
@@ -187,13 +189,27 @@ class SentryDartPlugin {
187189 }
188190
189191 Future <void > _executeNewRelease (String release) async {
190- await _executeAndLog ('Failed to create a new release' ,
192+ final taskName = 'create new release: $release ' ;
193+ Log .startingTask (taskName);
194+ final isSuccess = await _executeAndLog ('Failed to create a new release' ,
191195 [..._releasesCliParams (), 'new' , release]);
196+ if (isSuccess) {
197+ Log .taskCompleted (taskName);
198+ } else {
199+ Log .taskSkipped (taskName);
200+ }
192201 }
193202
194203 Future <void > _executeFinalizeRelease (String release) async {
195- await _executeAndLog ('Failed to finalize the new release' ,
204+ final taskName = 'finalize new release: $release ' ;
205+ Log .startingTask (taskName);
206+ final isSuccess = await _executeAndLog ('Failed to finalize the new release' ,
196207 [..._releasesCliParams (), 'finalize' , release]);
208+ if (isSuccess) {
209+ Log .taskCompleted (taskName);
210+ } else {
211+ Log .taskSkipped (taskName);
212+ }
197213 }
198214
199215 Future <void > _executeSetCommits (String release) async {
@@ -214,7 +230,14 @@ class SentryDartPlugin {
214230 params.add ('--ignore-missing' );
215231 }
216232
217- await _executeAndLog ('Failed to set commits' , params);
233+ final taskName = 'set commits' ;
234+ Log .startingTask (taskName);
235+ final isSuccess = await _executeAndLog ('Failed to set commits' , params);
236+ if (isSuccess) {
237+ Log .taskCompleted (taskName);
238+ } else {
239+ Log .taskSkipped (taskName);
240+ }
218241 }
219242
220243 Future <List <String >> _findAllJsFilePaths () async {
@@ -280,7 +303,7 @@ class SentryDartPlugin {
280303 return await _executeAndLog ('Failed to inject debug ids' , params);
281304 }
282305
283- Future <void > _uploadSourceMaps (
306+ Future <bool > _uploadSourceMaps (
284307 {required String release, required String ? dist}) async {
285308 List <String > params = [];
286309
@@ -325,7 +348,7 @@ class SentryDartPlugin {
325348
326349 params.addAll (_baseCliParams ());
327350
328- await _executeAndLog ('Failed to sources files' , params);
351+ return await _executeAndLog ('Failed to sources files' , params);
329352 }
330353
331354 /// Extracts and returns a list of path prefixes to strip from source maps.
@@ -417,7 +440,7 @@ class SentryDartPlugin {
417440 }
418441 }
419442
420- const taskName = 'uploading source maps' ;
443+ const taskName = 'uploading source maps (legacy) ' ;
421444 Log .startingTask (taskName);
422445
423446 final params = < String > [];
@@ -440,7 +463,13 @@ class SentryDartPlugin {
440463 _addWait (releaseJsFilesParams);
441464 _addUrlPrefix (releaseJsFilesParams);
442465
443- await _executeAndLog ('Failed to upload source maps' , releaseJsFilesParams);
466+ final isSourcemapsUploadSuccessful = await _executeAndLog (
467+ 'Failed to upload source maps' , releaseJsFilesParams);
468+ if (! isSourcemapsUploadSuccessful) {
469+ Log .taskSkipped (taskName);
470+ // no need to continue if it was a failure
471+ return ;
472+ }
444473
445474 if (_configuration.uploadSources) {
446475 // upload source files (dart)
@@ -457,8 +486,13 @@ class SentryDartPlugin {
457486
458487 _addWait (releaseDartFilesParams);
459488
460- await _executeAndLog (
489+ final isSourcesUploadSuccessful = await _executeAndLog (
461490 'Failed to upload source files' , releaseDartFilesParams);
491+ if (! isSourcesUploadSuccessful) {
492+ Log .taskSkipped (taskName);
493+ // no need to continue if it was a failure
494+ return ;
495+ }
462496 }
463497
464498 Log .taskCompleted (taskName);
@@ -471,12 +505,16 @@ class SentryDartPlugin {
471505
472506 final debugIdInjectionSucceeded = await _injectDebugIds ();
473507 if (debugIdInjectionSucceeded) {
474- await _uploadSourceMaps (release: release, dist: dist);
508+ final isSuccess = await _uploadSourceMaps (release: release, dist: dist);
509+ if (isSuccess) {
510+ Log .taskCompleted (taskName);
511+ } else {
512+ Log .taskSkipped (taskName);
513+ }
475514 } else {
476515 Log .warn ('Skipping source maps upload. Could not inject debug ids.' );
516+ Log .taskSkipped (taskName);
477517 }
478-
479- Log .taskCompleted (taskName);
480518 }
481519
482520 void _addUrlPrefix (List <String > releaseDartFilesParams) {
0 commit comments