File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -158,11 +158,13 @@ fn rm_rf(path: &Path) -> Result<()> {
158158 . with_context ( || format ! ( "failed to remove {:?}" , path) )
159159}
160160
161- pub fn run_release ( ) -> Result < ( ) > {
162- run ! ( "git switch release" ) ?;
163- run ! ( "git fetch upstream" ) ?;
164- run ! ( "git reset --hard upstream/master" ) ?;
165- run ! ( "git push" ) ?;
161+ pub fn run_release ( dry_run : bool ) -> Result < ( ) > {
162+ if !dry_run {
163+ run ! ( "git switch release" ) ?;
164+ run ! ( "git fetch upstream" ) ?;
165+ run ! ( "git reset --hard upstream/master" ) ?;
166+ run ! ( "git push" ) ?;
167+ }
166168
167169 let changelog_dir = project_root ( ) . join ( "../rust-analyzer.github.io/thisweek/_posts" ) ;
168170
Original file line number Diff line number Diff line change 9393 run_pre_cache ( )
9494 }
9595 "release" => {
96+ let dry_run = args. contains ( "--dry-run" ) ;
9697 args. finish ( ) ?;
97- run_release ( )
98+ run_release ( dry_run )
9899 }
99100 _ => {
100101 eprintln ! (
You can’t perform that action at this time.
0 commit comments