Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] self upgrading release binary #50

Open
kskarthik opened this issue Apr 7, 2024 · 4 comments
Open

[feature] self upgrading release binary #50

kskarthik opened this issue Apr 7, 2024 · 4 comments

Comments

@kskarthik
Copy link
Contributor

kskarthik commented Apr 7, 2024

The idea is to have similar feature to deno upgrade & bun upgrade in which the user can upgrade the existing binary using a cli flag.

This will be a useful feature for many users whose distributions which always do not ship with latest versions of the cli

I wish to work on this patch if we can agree on implementing such feature.

@speatzle
Copy link
Collaborator

speatzle commented Apr 7, 2024

I do not know of any distributions that ships go-passbolt-cli in their repositories, which is why i always planned to provide my own deb and rpm repositories for easy updates but got stalled due to my limited time and low demand.

Would having generic deb and rpm repositories solve your Issue? I think building an Updater from Scratch would be quite complex since it would also need to handle things like man pages and shell completions. The security implications would also have to be considered.

@kskarthik
Copy link
Contributor Author

kskarthik commented Apr 7, 2024

i have initially found this lib which can do the heavy lifing (also includes security aspects like checksum verification) https://github.com/creativeprojects/go-selfupdate

Would having generic deb and rpm repositories solve your Issue?

yes, it would. But it also implies user should add custom repos to their system

@speatzle
Copy link
Collaborator

speatzle commented Apr 8, 2024

I don't see how that library can update additional files like man pages or shell completions (maybe i missed it?). Also if anything goes wrong and can't start it anymore there is no possibility to downgrade again. I generally dislike the Windows Style Self updating.

I don't see adding custom repositories as such a big deal (you also have to do that if you are installing the passbolt server). go-passbolt-cli Simply is not big enough to be included in distros.

I tried to avoid having to add custom repos by looking into packaging the CLI as a Flatpak instead but their CLI Support has "Issues" we would have to work around flatpak/flatpak#1188 .

@kskarthik
Copy link
Contributor Author

I don't see how that library can update additional files like man pages or shell completions (maybe i missed it?). Also if anything goes wrong and can't start it anymore there is no possibility to downgrade again. I generally dislike the Windows Style Self updating.

Yes, The lib i shared does not handle man pages & shell completions.

I tried to avoid having to add custom repos by looking into packaging the CLI as a Flatpak instead but their CLI Support has "Issues" we would have to work around flatpak/flatpak#1188 .

yes, flatpaks are not ideal for CLIs. We have to add an alias & no support for man pages AFAIK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants