Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better artifact choosing algorithm #18

Open
LPGhatguy opened this issue Mar 11, 2020 · 0 comments
Open

Better artifact choosing algorithm #18

LPGhatguy opened this issue Mar 11, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@LPGhatguy
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant