File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ pub fn main() {
123
123
match res {
124
124
Ok ( _) => {
125
125
builder. sanitize_libraries ( ) ;
126
- builder . pack ( ) . unwrap ( )
126
+ // Note: tar creation is handled by CI, not by this binary
127
127
}
128
128
Err ( err) => panic ! ( "{}" , format!( "Building failed: {err}" ) ) ,
129
129
}
Original file line number Diff line number Diff line change @@ -167,6 +167,25 @@ impl Builder {
167
167
module. build ( ) ?;
168
168
module. install ( ) ?;
169
169
}
170
+ self . copy_license_files ( ) ?;
171
+ Ok ( ( ) )
172
+ }
173
+
174
+ /// Copy license files to the target directory
175
+ pub fn copy_license_files ( & self ) -> Result < ( ) > {
176
+ let project_root = project_root ( ) ;
177
+ let license_files = [ "LICENSE" , "LICENSE-3rdparty.yml" , "NOTICE" ] ;
178
+
179
+ for file in & license_files {
180
+ let source_path = project_root. join ( file) ;
181
+ let dest_path = Path :: new ( self . target_dir . as_ref ( ) ) . join ( file) ;
182
+
183
+ if source_path. exists ( ) {
184
+ fs:: copy ( & source_path, & dest_path)
185
+ . map_err ( |e| anyhow:: anyhow!( "Failed to copy {}: {}" , file, e) ) ?;
186
+ }
187
+ }
188
+
170
189
Ok ( ( ) )
171
190
}
172
191
You can’t perform that action at this time.
0 commit comments