@@ -61,6 +61,9 @@ actor! {
61
61
/// The formats used to compress the tarball
62
62
#[ arg( value_name = "FORMAT" , default_value_t) ]
63
63
compression_formats: CompressionFormats ,
64
+
65
+ /// Indicate whether to leave the prepared directories without generating tarballs
66
+ prepare_only: bool ,
64
67
}
65
68
}
66
69
@@ -105,17 +108,19 @@ impl Generator {
105
108
. output_script ( path_to_str ( & output_script) ?. into ( ) ) ;
106
109
scripter. run ( ) ?;
107
110
108
- // Make the tarballs
109
- create_dir_all ( & self . output_dir ) ?;
110
- let output = Path :: new ( & self . output_dir ) . join ( & self . package_name ) ;
111
- let mut tarballer = Tarballer :: default ( ) ;
112
- tarballer
113
- . work_dir ( self . work_dir )
114
- . input ( self . package_name )
115
- . output ( path_to_str ( & output) ?. into ( ) )
116
- . compression_profile ( self . compression_profile )
117
- . compression_formats ( self . compression_formats ) ;
118
- tarballer. run ( ) ?;
111
+ if !self . prepare_only {
112
+ // Make the tarballs
113
+ create_dir_all ( & self . output_dir ) ?;
114
+ let output = Path :: new ( & self . output_dir ) . join ( & self . package_name ) ;
115
+ let mut tarballer = Tarballer :: default ( ) ;
116
+ tarballer
117
+ . work_dir ( self . work_dir )
118
+ . input ( self . package_name )
119
+ . output ( path_to_str ( & output) ?. into ( ) )
120
+ . compression_profile ( self . compression_profile )
121
+ . compression_formats ( self . compression_formats ) ;
122
+ tarballer. run ( ) ?;
123
+ }
119
124
120
125
Ok ( ( ) )
121
126
}
0 commit comments