Skip to content

Commit

Permalink
Merge pull request #320 from hermit-os/dist-name
Browse files Browse the repository at this point in the history
fix(xtask): disambiguate distribution names
  • Loading branch information
mkroening authored Apr 8, 2024
2 parents e8c3b52 + 02b6adc commit b15e0ac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions xtask/src/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<PathBuf>()
Expand Down
20 changes: 10 additions & 10 deletions xtask/src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit b15e0ac

Please sign in to comment.