Add support for Txz archives

This commit is contained in:
Félix Saparelli 2021-03-06 22:35:05 +13:00
parent e5705171a7
commit 9c06ca94cb
No known key found for this signature in database
GPG key ID: B948C4BAE44FC474
5 changed files with 43 additions and 7 deletions

View file

@ -30,6 +30,8 @@ pub enum PkgFmt {
Tar,
/// Download format is TGZ (TAR + GZip)
Tgz,
/// Download format is TAR + XZ
Txz,
/// Download format is raw / binary
Bin,
}
@ -50,7 +52,7 @@ pub struct Meta {
}
/// Metadata for binary installation use.
///
///
/// Exposed via `[package.metadata]` in `Cargo.toml`
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case", default)]
@ -146,7 +148,7 @@ mod test {
assert_eq!(
manifest.bin.as_slice(),
&[
Product{
Product{
name: Some("cargo-binstall".to_string()),
path: Some("src/main.rs".to_string()),
edition: Some(cargo_toml::Edition::E2018),