Skip to content

Better artifact choosing algorithm #18

@LPGhatguy

Description

@LPGhatguy

Right now, Foreman just picks the first artifact that has the name of your platform in it.

Some software like ripgrep has releases with lots of artifacts. For this release, 11.0.2, there are four Windows releases alone:

  1. ripgrep-11.0.2-i686-pc-windows-gnu.zip
  2. ripgrep-11.0.2-i686-pc-windows-msvc.zip
  3. ripgrep-11.0.2-x86_64-pc-windows-gnu.zip
  4. ripgrep-11.0.2-x86_64-pc-windows-msvc.zip

On my system, the ideal choice would be artifact 4, because it is 64-bit and compiled for MSVC, my preferred compiler.

We should change the artifact-choosing algorithm to extract "attributes" from an artifact based on its name. From there, we can rank artifacts and choose the best one for our platform. Some attributes we might pick include:

  1. Platform, like Windows or macOS
  2. Architecture, like i686/x86/32, x86_64/x64/64, arm, or aarch64
  3. Toolchain, like MSVC, GNU or MUSL

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions