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

Fix artifact matching being sensitive to extensions, add tests #39

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

filiptibell
Copy link
Collaborator

In version 0.1.2 of Rokit, more specifically commit f7f928f, Rokit started using a more strict OS and architecture detection algorithm. This passed all tests, but unfortunately, our tests did not catch a fatal flaw: OS and architecture detection was now sensitive to file extensions being included in the search string. Artifact names such as these:

  • toolname-win.zip
  • toolname-win64.zip

no longer downloaded correctly because win.zip was being interpreted as one "word" and this word was not in the list of words matching the Windows platform. This PR fixes the issue by stripping file extensions before parsing, and also adds extra tests to the ArtifactFormat enum and its parsing since it underwent some larger changes.

@filiptibell filiptibell merged commit 1c6b7ef into main Jul 15, 2024
10 checks passed
@filiptibell filiptibell deleted the extension-sensitivity-and-tests branch July 15, 2024 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant