File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -189,6 +189,7 @@ pub async fn command_upload_release_distributions(args: &ArgMatches) -> Result<(
189
189
. value_of ( "organization" )
190
190
. expect ( "organization should be specified" ) ;
191
191
let repo = args. value_of ( "repo" ) . expect ( "repo should be specified" ) ;
192
+ let dry_run = args. is_present ( "dry_run" ) ;
192
193
193
194
let mut filenames = std:: fs:: read_dir ( & dist_dir) ?
194
195
. into_iter ( )
@@ -287,6 +288,10 @@ pub async fn command_upload_release_distributions(args: &ArgMatches) -> Result<(
287
288
. header ( "Content-Type" , "application/x-tar" )
288
289
. body ( file_data) ;
289
290
291
+ if dry_run {
292
+ continue ;
293
+ }
294
+
290
295
let response = client. execute ( request) . await ?;
291
296
292
297
if !response. status ( ) . is_success ( ) {
Original file line number Diff line number Diff line change @@ -104,6 +104,11 @@ fn main_impl() -> Result<()> {
104
104
. takes_value ( true )
105
105
. help ( "Date/time tag associated with builds" ) ,
106
106
)
107
+ . arg (
108
+ Arg :: new ( "dry_run" )
109
+ . short ( 'n' )
110
+ . help ( "Dry run mode; do not actually upload" ) ,
111
+ )
107
112
. arg (
108
113
Arg :: new ( "tag" )
109
114
. long ( "--tag" )
You can’t perform that action at this time.
0 commit comments