Closed abdheshnayak closed 6 months ago
Thanks for the PR :) is there a particular reason we need to use BinSource
? the shell script uses Program
The repository can be monolithic where multiple binaries can be distributed so, that's why I introduced source where users can provide the name of binary. And It will filter and download the exact binary.
For example: github.com/kloudlite/kl
Where the repository is going to distribute two binaries kl and kli.
Please review and if there is something wrong, you can mention i will update it so you can accept the pull request. In case of pr is not that useful or something else please do close the pr by providing your feedback.
I would like to add windows support to installer, but I would also like it be high-quality, and work the same way as the bash script installer.
currently:
foobar
gives you binary foobar
Program
is "foobar"
as=fb
and then it renames it fb
(1) change would be:
foobar
gives you binary foobar.exe
I would consider multi-binary downloads as an extra feature - though it should work the same way as it does in bash
multi=true
or all=true
param (im open to param name ideas)multi
, it just searches the archive for all executables, and puts them into /usr/local/bin
BinSource
field(2) change would be to add a method to the Assets
(a Assets) FilterFor(filetype string) Assets
darwin
and linux
assetswindows
assets(3) change is optional, and it would be to support multiple archive types. id accept the PR if it only supported zip
, but would be nice if we could do gz
and tar.gz
too (see https://github.com/kloudlite/bin-installer/blob/f055686c741e934ed6abc39de33645f4ffa3e933/handler/handler_execute.go#L154)
lastly, i am very short for time at the moment! so I may not respond quickly
Pull Request #46 embodies similar functionalities to this, yet it demonstrates an enhanced level of code quality. In light of this, and to maintain the integrity and optimization of the project's codebase, I propose the closure of this pull request. This decision is made with the consideration of ensuring that we adopt the most efficient and well-structured solutions.