mvdan / sh

A shell parser, formatter, and interpreter with bash support; includes shfmt
https://pkg.go.dev/mvdan.cc/sh/v3
BSD 3-Clause "New" or "Revised" License
6.98k stars 332 forks source link

extensions for released artifacts #1001

Closed tomdavidson closed 1 year ago

tomdavidson commented 1 year ago

Any appetite to release artifacts as archives? Some tools treat everything after the last . as the extension and panic on .0_linux_amd64

mvdan commented 1 year ago

What do you mean by archives?

Also, what kind of tools behave like that? It's been many years and you're the first one to run into an issue like that.

tomdavidson commented 1 year ago

​Thanks for the super fast response. By archives, I mean something to unpack like a zip or tar such as this example. I totally get that this is a catch with proto's generic plugin schema that is not supporting the case where the artifact is not an archive - I shouldn't have opened this issue.

mvdan commented 1 year ago

I see what you mean now. Using archives would be reasonable if we had more files to distribute for each platform, like config files, but we simply don't. The license and man pages could be candidates, but they aren't really required. Windows does have an extension for binaries, but as far as I can tell, other platforms like Linux and Mac don't.

It is perhaps slightly weird that our extension-less binary filenames still contain periods, but not including the semver version feels strictly worse :)

I would suggest filing a bug with proto. I'm not exactly sure what logic they would want, but if the purpose of their code is to find which release assets available to download are executables, I think it's reasonable to assume that my extension-less files weighing a couple of megabytes are binaries.

tomdavidson commented 1 year ago

Hey thanks. I completely agree with this being close. It does seem a bit tricky to know if it's an extension or period in the file name, but I have some ideas.