-
Notifications
You must be signed in to change notification settings - Fork 251
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
Upgrade templates without git incantation #1095
Conversation
71ea669
to
a6d46f7
Compare
I like this one. this is also inline with our
hm, i can see it can be useful when user is working on changing template from e.g. fork of a repo. |
I second the "prompt by default" option. Other than that this looks good to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No approving code, just experience
a6d46f7
to
1f41ccf
Compare
@rajatjindal @mikkelhegn Thanks for the feedback - it now prompts by default. |
So are we keeping |
Signed-off-by: itowlson <ivan.towlson@fermyon.com>
1f41ccf
to
c62278f
Compare
Yes, if we agree that the command should be called (I have left the Rust field as being called |
LGTM code-wise. I am +1 for the experience discussed above. |
Awesome upgrade! 💯 |
Fixes #990.
Some details on which I would like feedback:
spin templates upgrade
rather thanupdate
. This aligns with the plugins UI, where 'update' refers to updating the catalogue andupgrade
is used to actually install a new version. However,update
is established inspin templates install --update
(easy to alias), and is misleading if a user is moving back to an earlier version of Spin.I have defaulted it to upgrading templates from all known repositories. If the user wants to be selective, they can passAfter feedback, it now prompts by default, with a--ask
. An alternative approach would be to prompt by default, and require--all
to upgrade all without prompting.--all
flag to upgrade all without prompting.--repo/--branch
options. This is an exact synonym forinstall --update
- is it worth bothering? I'm leaning against it now. (The user could pass--ask
and just select the one repo, but could not then select a specific tag.)The report at the end is a work in progress. It will not, actually, boo errors (deserve it though they might).This is now fixed: have at it.The
prompt UI is via the--ask
dialoguer
crate and looks like this:I'm not much in love with it but I don't want to invest in re-implementing it. If there are better Rust terminal libraries then I'm happy to change.
Signed-off-by: itowlson ivan.towlson@fermyon.com