Skip to content

Commit

Permalink
feat: actually copy the designated files into the tarball
Browse files Browse the repository at this point in the history
  • Loading branch information
fosskers committed Mar 5, 2024
1 parent fc23ad8 commit d08e994
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ codegen-units = 1
panic = "abort"

[package.metadata.aur]
depends = ["blah"]
files = [["/path/to/original", "/path/to/target"]]
# depends = ["blah"]
# files = [[".github/dependabot.yml", "$pkgdir/usr/local/share/cargo-aur/dependabot.yml"]]
11 changes: 11 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,17 @@ fn tarball(
if let Some(lic) = license {
command.arg(lic.path());
}
if let Some(files) = config
.package
.metadata
.as_ref()
.and_then(|m| m.aur.as_ref())
.map(|a| a.files.as_slice())
{
for (file, _) in files {
command.arg(file);
}
}
command.status()?;

std::fs::remove_file(binary_name)?;
Expand Down

0 comments on commit d08e994

Please sign in to comment.