Using auto-update
Junkern opened this issue · 7 comments
I am interesting in using this plugin. Is it in a state where I can use it, yet? If so, what are the commands/codes to include it in my existing oclif CLI, what do I need to support at my server?
It’s still a WIP. It does function if you want to try to understand the code but there may be some breaking changes until we have it in the Heroku CLI. It should be complete soon though, it’s one of my top priorities right now
Is it going to be S3 only? Is there no way to check for an update on NPM, and update from there?
It will be S3 only for now. I have some work done around using GitHub releases as an alternative. I'm not sure if/when I'll pick that back up though.
Using npm would have issues. It can't do atomic updates. So I wouldn't use the npm client. It may update to a version with an incompatible node version. Perhaps this could be checked ahead of time by looking at the node engine. Still though, this approach lets us use our own node binary that can't conflict with any node on the machine so it's a more reliable approach.
I've considered resolving this by fetching the node binary separately from nodejs.org.
Lastly, channels are really useful and could probably be reimplemented using dist-tags but that's significant work.
Maybe one day we could do this, but it's frankly not that high on my priority list.
I just realized another big reason why npm would be difficult: because it doesn't look at the yarn lockfile—and wouldn't use package-lock.json
either. We would have to use shrinkwrap which isn't compatible with yarn. Building a tarball ensures the build is static.
Any update on the githug releases feature?
It's nowhere near my todo list currently