devmatteini / dra

A command line tool to download release assets from GitHub
MIT License
179 stars 9 forks source link

Error: automatic download of asset #191

Closed rgarrigue closed 6 months ago

rgarrigue commented 7 months ago

dra version

0.5.2

Bug report

Repository: flosell/iam-policy-json-to-terraform Release: 1.8.2 OS: linux ARCH: x86_64

Hello. The above repository got the relevant bin named amd64, maybe you can match it automatically ?

devmatteini commented 7 months ago

Hi @rgarrigue!

The current matching algorithm need both the OS and ARCH (or aliases) inside the asset name.

In your case, the asset iam-policy-json-to-terraform_amd64 only matches the ARCH.

For the time being, you can use dra download -s iam-policy-json-to-terraform_amd64 flosell/iam-policy-json-to-terraform.

I will leave this issue open, as there might be some way to improve the matching algorithm to handle this edge cases, but I'm not really sure how right now

rgarrigue commented 7 months ago

Ah indeed. Well, since a .exe was in the list as well as Darwin stuff, it was quite obvious that I should pick amd64. Not sure what the Alpine is about, maybe muslc.

You can leave this open if the above criteria is an idea of improvement, otherwise just close it. It's rather due to a non "standard" way of naming the release assets

devmatteini commented 6 months ago

I thought about this and decided that the current implementation is fine. We shouldn't handle every edge case for non-standard names.