From 02b6adcb77b5f090095d6c2ba739d6f173111bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Mon, 8 Apr 2024 13:27:18 +0200 Subject: [PATCH] fix(xtask): disambiguate distribution names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Kröning --- xtask/src/artifact.rs | 3 +-- xtask/src/target.rs | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/xtask/src/artifact.rs b/xtask/src/artifact.rs index 9c97471f..82a473f9 100644 --- a/xtask/src/artifact.rs +++ b/xtask/src/artifact.rs @@ -59,9 +59,8 @@ impl Artifact { pub fn dist_object(&self) -> Object { [ self.target_dir(), - self.target.name().as_ref(), self.profile_path_component().as_ref(), - self.target.image_name().as_ref(), + self.target.dist_name().as_ref(), ] .iter() .collect::() diff --git a/xtask/src/target.rs b/xtask/src/target.rs index c328dce0..ae27b9cd 100644 --- a/xtask/src/target.rs +++ b/xtask/src/target.rs @@ -26,16 +26,6 @@ impl Target { Ok(()) } - pub fn name(&self) -> &'static str { - match self { - Self::X86_64 => "x86_64", - Self::X86_64Fc => "x86_64-fc", - Self::X86_64Uefi => "x86_64-uefi", - Self::Aarch64 => "aarch64", - Self::Riscv64 => "riscv64", - } - } - pub fn arch(&self) -> &'static str { match self { Self::X86_64 => "x86_64", @@ -95,6 +85,16 @@ impl Target { _ => "hermit-loader", } } + + pub fn dist_name(&self) -> &'static str { + match self { + Self::X86_64 => "hermit-loader-x86_64", + Self::X86_64Fc => "hermit-loader-x86_64-fc", + Self::X86_64Uefi => "hermit-loader.efi", + Self::Aarch64 => "hermit-loader-aarch64", + Self::Riscv64 => "hermit-loader-riscv64", + } + } } impl FromStr for Target {