I think it should be slightly special, in that the vast majority of cases people will want to run this command is when they're about to do init. For the sake of pedagogy (and making people Update Update Update), it would be nice if update just ran init for you by default. As such I propose the following slightly weird semantics:
[x] By default this should assume it should only be run in a dir you could run cargo dist init in
[x] Add an --only-bins flag or something to opt out of this requirement
[x] If installed (or if no updates needed), re-exec as the new binary and run init
[ ] Add a --reinstall flag or something to force the updater to assume the application is out of date and should be refetched (useful for testing)
[x] Add a --version flag to pick a version to install (useful for testing)
[ ] Add a --??? flag to say "hey generate an installer script and use that instead of fetching"
Add
cargo dist update
command.I think it should be slightly special, in that the vast majority of cases people will want to run this command is when they're about to do
init
. For the sake of pedagogy (and making people Update Update Update), it would be nice ifupdate
just raninit
for you by default. As such I propose the following slightly weird semantics:cargo dist init
in--only-bins
flag or something to opt out of this requirementinit
--reinstall
flag or something to force the updater to assume the application is out of date and should be refetched (useful for testing)--version
flag to pick a version to install (useful for testing)--???
flag to say "hey generate an installer script and use that instead of fetching"