@@ -497,7 +497,7 @@ fn main() -> Result<()> {
497497 update_changelog ( & ctx. root , c) ?;
498498 }
499499
500- let mut processed = HashSet :: new ( ) ;
500+ // Test publish
501501 for crate_name in & crate_names {
502502 let start = ctx
503503 . graph
@@ -507,22 +507,39 @@ fn main() -> Result<()> {
507507 let weight = ctx. graph . g . node_weight ( * start) . unwrap ( ) ;
508508 let c = ctx. crates . get ( weight) . unwrap ( ) ;
509509 publish_release ( & ctx. root , c, false ) ?;
510+ }
510511
511- println ! ( "# Please inspect changes and run the following commands when happy:" ) ;
512+ println ! ( "# Please inspect changes and run the following commands when happy:" ) ;
513+ println ! ( "git commit -a -m 'chore: prepare crate releases'" ) ;
514+ println ! ( ) ;
512515
513- println ! ( "git commit -a -m 'chore: prepare crate releases'" ) ;
516+ let mut processed = HashSet :: new ( ) ;
517+ for crate_name in & crate_names {
518+ let start = ctx
519+ . graph
520+ . i
521+ . get ( crate_name)
522+ . expect ( "unable to find crate in tree" ) ;
514523 let mut bfs = Bfs :: new ( & ctx. graph . g , * start) ;
515524 while let Some ( node) = bfs. next ( & ctx. graph . g ) {
516525 let weight = ctx. graph . g . node_weight ( node) . unwrap ( ) ;
517526 let c = ctx. crates . get ( weight) . unwrap ( ) ;
518527 if c. publish && !processed. contains ( weight) {
528+ processed. insert ( weight. clone ( ) ) ;
519529 println ! ( "git tag {}-v{}" , weight, c. version) ;
520530 }
521531 }
532+ }
522533
523- println ! ( ) ;
524- println ! ( "# Run these commands to publish the crate and dependents:" ) ;
525-
534+ let mut processed = HashSet :: new ( ) ;
535+ println ! ( ) ;
536+ println ! ( "# Run these commands to publish the crate and dependents:" ) ;
537+ for crate_name in & crate_names {
538+ let start = ctx
539+ . graph
540+ . i
541+ . get ( crate_name)
542+ . expect ( "unable to find crate in tree" ) ;
526543 let mut bfs = Bfs :: new ( & ctx. graph . g , * start) ;
527544 while let Some ( node) = bfs. next ( & ctx. graph . g ) {
528545 let weight = ctx. graph . g . node_weight ( node) . unwrap ( ) ;
@@ -559,11 +576,11 @@ fn main() -> Result<()> {
559576 }
560577 }
561578 }
562-
563- println ! ( ) ;
564- println ! ( "# Run this command to push changes and tags:" ) ;
565- println ! ( "git push --tags" ) ;
566579 }
580+
581+ println ! ( ) ;
582+ println ! ( "# Run this command to push changes and tags:" ) ;
583+ println ! ( "git push --tags" ) ;
567584 }
568585 }
569586 Ok ( ( ) )
0 commit comments