devops-works / binenv

One binary to rule them all. Manage all those pesky binaries (kubectl, helm, terraform, ...) easily.
MIT License
373 stars 44 forks source link

Questions for adding new tools #54

Closed deknos closed 3 years ago

deknos commented 3 years ago

Hi, i continue to add tools which are used in various projects in our organization. i have a few issues again =)

  1. i often get on update this error for packer: 020-11-29T09:56:56Z WRN ignoring invalid version for "packer" error="Malformed version: nightly" Do you plan to fix this? is this fixable? would you recommend for me to look into the code?
  2. i wanted to add k3sup when i also add k3d, but what do i do, when the linux version does not conform to the naming convention like in https://github.com/alexellis/k3sup/releases/tag/0.9.11 ? is there any way to work with this? or should i open an issue with the project?
  3. When there is windows, there may be an .exe, is the exeextension for linux just zero characters then?
  4. i am a little bit unsure how to progress with rust projects which seem to adhere to this release structure: https://github.com/sharkdp/fd/releases/tag/v8.1.1 Should i use the unknown-linux-architecture? in the tar.gz files there are more things than just the binary, will this work with type tgz and binaries: - fd?
  5. when i just type tgz, but it's zip on windows, does your extraction strategy automatically fit this to the platform (like perhaps with exeextension?)
  6. how do i progress when there are multiple binaries in the tar gz? shall i name then in binaries:? and what if they are in a subdirectory like in the project with https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_linux_amd64.tar.gz
deknos commented 3 years ago

one point btw: i know i can copy my distributions file from my repository to my testenvironment. but updating with --project and --branch as parameters would be way more convienient with testing =D. but that's okay.

deknos commented 3 years ago

Another question: which format is distributions/distributions.yaml? when i type cat distributions/distributions.yaml | yq r - i get changed stuff and descriptions have no linebreak anymore.

leucos commented 3 years ago

It's yaml. yq probably reformats it it's own way.

leucos commented 3 years ago

Hi, i continue to add tools which are used in various projects in our organization. i have a few issues again =)

  1. i often get on update this error for packer: 020-11-29T09:56:56Z WRN ignoring invalid version for "packer" error="Malformed version: nightly" Do you plan to fix this? is this fixable? would you recommend for me to look into the code?

We might consider exclusion filters. Basically, binenv requires "semver-like" version numbers.

  1. i wanted to add k3sup when i also add k3d, but what do i do, when the linux version does not conform to the naming convention like in https://github.com/alexellis/k3sup/releases/tag/0.9.11 ? is there any way to work with this? or should i open an issue with the project?

I do not really see the problem here. Could you open a separate issue ? I will add it.

  1. When there is windows, there may be an .exe, is the exeextension for linux just zero characters then?

Exactly.

  1. i am a little bit unsure how to progress with rust projects which seem to adhere to this release structure: https://github.com/sharkdp/fd/releases/tag/v8.1.1 Should i use the unknown-linux-architecture? in the tar.gz files there are more things than just the binary, will this work with type tgz and binaries: - fd?

Yes, it should work. You can filter out what you want from the tar. See toji for instance, or traefik right after.

  1. when i just type tgz, but it's zip on windows, does your extraction strategy automatically fit this to the platform (like perhaps with exeextension?)

Nope. We have no real solutions for now besides adding two entries. See httpx/httpx-win (https://github.com/devops-works/binenv/blob/develop/distributions/distributions.yaml#L377)

  1. how do i progress when there are multiple binaries in the tar gz? shall i name then in binaries:? and what if they are in a subdirectory like in the project with https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_linux_amd64.tar.gz

Unfortunately there is now way to do that actually. binenv can only install a single binary right now.

deknos commented 3 years ago

Thanks for your answers! regarding point 2, i will try it myself and open an issue if it won't work

leucos commented 3 years ago

@deknos I am closing this. Don't hesitate opening new issues if needed (help on adding k3sup or anything else).