taplo icon indicating copy to clipboard operation
taplo copied to clipboard

Provide a binary release built on musl-c for taplo-cli

Open yisonPylkita opened this issue 3 years ago • 3 comments

Right now to use taplo-cli I have to get cargo first and then build taplo-cli. Runime performance-wise it's a good idea but when it comes to an ease of setup it's not that good. Lately I started working more with Docker containers and GH Actions with a variety of Linux distributions on it and using taplo there to lint my tol files is quite problematic. What I'd like to see is a pre-built release of taplo-cli I can download from this page. I think x86_64-unknown-linux-musl target will suite this purpose best. I see there is a GitHub Action to automate such process - https://github.com/marketplace/actions/automatic-releases

Would you be interested in such a feature?

yisonPylkita avatar Feb 15 '21 10:02 yisonPylkita

Definitely! The only reason Taplo doesn't have prebuilt binaries is that I didn't take the time to set them up.

That being said, I don't have a lot of time right now either, so PRs are welcome!

tamasfe avatar Feb 15 '21 12:02 tamasfe

I started work on this here. For every new tag prefixed v GH Action will compile taplo-dummy with x86_64-unknown-linux-musl target and will attach compiled application as a zip to releases page To not mix this with your existing workflow I would see this as a new workflow file in .github/workflows Is this good enough for a PR?

yisonPylkita avatar Feb 15 '21 19:02 yisonPylkita

Thanks!

Looks good so far, just a few things:

  • Right now things are independently versioned, the CLI tags start with release-cli-*
  • It would also be good to have a glibc version as well I think that's still more common than musl
  • I would use .tar.gz instead of .zip as it should retain the executable permission
  • probably run strip on the binary? It seems to shrink its size to about half of the original
  • Probably include a windows (and macos) build as well while we're at it

tamasfe avatar Feb 15 '21 20:02 tamasfe