Open bertfrees opened 7 years ago
Currently the dp2 cli can be updated by the updater cli, but the updater cli cannot update itself (I don't know how that works for the updater GUI, but I believe it's the same, right @marisademeglio?). Leaving the updater as a separate executable would probably make updating easier as it wouldn't have to replace itself. Having the updater replace itself might potentially be a problem as well if something goes wrong during the update. However, allowing the updater to update itself would also be useful for fixing bugs and adding features without having to make a new full release of DP2, and of course it's slightly more user friendly.
I would also like to keep the "minimal" packaging of DP2 (containing only the updater cli), but that would probably not be difficult to simply change to dp2.
Right. Didn't think about that. It makes things a bit more challenging but not impossible I think. I'm not exactly sure what currently happens when something goes wrong during the update. In principle a backup should be made of the old files so they can always be restored. As long as we do the same with the updater itself it should be fine. Maybe on Windows it is not allowed to delete an executable while it's running. But in that case we could simply tell the user to delete it afterwards, or possibly move it to some directory that is automatically deteled by the operating system.
Via a subcommand
update
. This shouldn't be that much work because pipeline-updater is also written in Go.