Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion builder/src/bin/release.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub fn main() {
match res {
Ok(_) => {
builder.sanitize_libraries();
builder.pack().unwrap()
// Note: tar creation is handled by CI, not by this binary
}
Err(err) => panic!("{}", format!("Building failed: {err}")),
}
Expand Down
19 changes: 19 additions & 0 deletions builder/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,25 @@ impl Builder {
module.build()?;
module.install()?;
}
self.copy_license_files()?;
Ok(())
}

/// Copy license files to the target directory
pub fn copy_license_files(&self) -> Result<()> {
let project_root = project_root();
let license_files = ["LICENSE", "LICENSE-3rdparty.yml", "NOTICE"];

for file in &license_files {
let source_path = project_root.join(file);
let dest_path = Path::new(self.target_dir.as_ref()).join(file);

if source_path.exists() {
fs::copy(&source_path, &dest_path)
.map_err(|e| anyhow::anyhow!("Failed to copy {}: {}", file, e))?;
}
}

Ok(())
}

Expand Down
Loading