EmberTown / ember-hearth

Original version of Ember Hearth. See website for successor.
https://github.com/ember-learn/ember-hearth
MIT License
107 stars 13 forks source link

Handle updates of manually installed tools #21

Open thomassnielsen opened 9 years ago

thomassnielsen commented 9 years ago

Especially if we install them through Hearth. I've got a feeling that we should some how track this (as mentioned in #20), but I'm not sure how. In any case, we should allow the user to intervene before updating. Screwing up someones fragile CLI tool setup is a big sin.

thomassnielsen commented 9 years ago

I'm tempted to suggest that Hearth should install all tools in it's own directory and add it to the path. That should work, and we'll have a way to detect that it's ours, without making it available only in the GUI.

thomassnielsen commented 9 years ago

We followed the idea above, first compiling from source in 0.1.0, bundling binaries in 0.2.0.

What we need going forward is a way to know if the bundled version is above the installed one. For installed once we have .version() for every tool, but for the bundled one it might be harder, as we (as for now) bundle the new binaries in compressed archives.

I'd love to avoid hardcoding the version in code.

The best I can come up with now is to extract the bundled archive to a temp location and compare version with the binary found with which. Since we haven't decided the UI for updating tools yet, this may or may not be a workable solution.