File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ fn process_repository<'a>(
239
239
if let Some ( commit_id) = commits. first ( ) . map ( |c| c. id ( ) . to_string ( ) ) {
240
240
match tags. get ( & commit_id) {
241
241
Some ( tag) => {
242
- warn ! ( "There is already a tag ({:? }) for {}" , tag, commit_id) ;
242
+ warn ! ( "There is already a tag ({}) for {}" , tag. name , commit_id) ;
243
243
}
244
244
None => {
245
245
tags. insert ( commit_id, repository. resolve_tag ( tag) ) ;
@@ -302,13 +302,6 @@ fn process_repository<'a>(
302
302
. extend ( custom_commits. iter ( ) . cloned ( ) . map ( Commit :: from) ) ;
303
303
}
304
304
305
- // Set custom message for the latest release.
306
- if let Some ( message) = & args. with_tag_message {
307
- if let Some ( latest_release) = releases. iter_mut ( ) . last ( ) {
308
- latest_release. message = Some ( message. to_owned ( ) ) ;
309
- }
310
- }
311
-
312
305
// Set the previous release if the first release does not have one set.
313
306
if releases[ 0 ]
314
307
. previous
@@ -343,6 +336,17 @@ fn process_repository<'a>(
343
336
}
344
337
}
345
338
339
+ // Set custom message for the latest release.
340
+ if let Some ( message) = & args. with_tag_message {
341
+ if let Some ( latest_release) = releases
342
+ . iter_mut ( )
343
+ . filter ( |release| !release. commits . is_empty ( ) )
344
+ . last ( )
345
+ {
346
+ latest_release. message = Some ( message. to_owned ( ) ) ;
347
+ }
348
+ }
349
+
346
350
Ok ( releases)
347
351
}
348
352
You can’t perform that action at this time.
0 commit comments