feat: actually copy the designated files into the tarball

This commit is contained in:
Colin Woodbury
2024-03-05 21:57:27 +09:00
parent fc23ad83fe
commit d08e994b52
2 changed files with 13 additions and 2 deletions

View File

@@ -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"]]

View File

@@ -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)?;