You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this project there is an "extended" binary asset as well as the "basic" asset.
When using dra -a dra only finds the first and doesn't even complain that there are two suitable assets.
So at the very least it should complain that there are two or more suitable and not just download the first matching which it does now.
If dra download supported say -f <string> then could be used to differentiate the two (or more). Maybe it should be treated like regex so you could use ! (not).
So in the case of the hugo repo
dra download -a -i -f extended gohugoio/hugo dra download -a -i -f !extended gohugoio/hugo
I know it's possible to use untag and select but that means you have to first manually select the item which means it will fill in OS/arch. I didn't see any placeholder in that string for {OS} {arch} {type}
i.e. -s does not support this hugo_extended_{tag}_{OS}-{arch}.{type} which if it did then maybe that would be ok in place of a filter.
but the single binary with no dependencies is super nice and it is available as a package in most distros except sadly alpine but I suppose the script you wrote will suffice, albeit with dependency on bash. So yea if not a big deal for your CI could you include alpine :).
The text was updated successfully, but these errors were encountered:
as a package in most distros except sadly alpine but I suppose the script you wrote will suffice
I didn't have time yet to look into Alpine, but there is feature request open #265.
Now, for the other questions:
In this project there is an "extended" binary asset as well as the "basic" asset.
When using dra -a dra only finds the first and doesn't even complain that there are two suitable asset
So at the very least it should complain that there are two or more suitable and not just download the first matching which it does now.
This is how automatic download works. You let dra choose what to download. It's meant to be non-interactive, and dra takes decisions on which asset to select on a set of rules for each OS+ARCH.
If dra download supported say -f then could be used to differentiate the two (or more). Maybe it should be treated like regex so you could use ! (not).
As you already said, you should use selection download when you need to control which asset to download.
I know it's possible to use untag and select but that means you have to first manually select the item which means it will fill in OS/arch.
Do you need to download this asset in a script that works on different OS?
If yes you can pre compute the untagged asset names for each OS, and then in your script use the right one for the current platform.
I didn't see any placeholder in that string for {OS} {arch} {type}
Unfortunately, I can't think of a good solution to include more placeholder like OS or ARCH. There are many different conventions like x86_64 and amd64.
There are some repo releases that come with more than one asset of suitable OS/architecture.
Example:
https://github.com/gohugoio/hugo/releases/tag/v0.142.0
In this project there is an "extended" binary asset as well as the "basic" asset.
When using
dra -a
dra only finds the first and doesn't even complain that there are two suitable assets.dra download
supported say-f <string>
then could be used to differentiate the two (or more). Maybe it should be treated like regex so you could use ! (not).So in the case of the hugo repo
dra download -a -i -f extended gohugoio/hugo
dra download -a -i -f !extended gohugoio/hugo
I know it's possible to use untag and select but that means you have to first manually select the item which means it will fill in OS/arch. I didn't see any placeholder in that string for {OS} {arch} {type}
i.e. -s does not support this
hugo_extended_{tag}_{OS}-{arch}.{type}
which if it did then maybe that would be ok in place of a filter.BTW thanks for this project!
I have created a number of scripts for this purpose over the years and used ideas from here
https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8
and also used this python script
https://github.com/dvershinin/lastversion
but the single binary with no dependencies is super nice and it is available as a package in most distros except sadly alpine but I suppose the script you wrote will suffice, albeit with dependency on bash. So yea if not a big deal for your CI could you include alpine :).
The text was updated successfully, but these errors were encountered: