Skip to content

Show version diff when updating a single extension - #6647

Merged
samcoe merged 3 commits into
cli:trunkfrom
despreston:des-6483-vers
Dec 8, 2022
Merged

samcoe merged 3 commits into
cli:trunkfrom
despreston:des-6483-vers

Conversation

@despreston

@despreston despreston commented Nov 21, 2022 •

Copy link
Copy Markdown
Contributor

This refactors the extension upgrade command to use Manager.upgradeExtensions when updating all extensions and single extensions. With this approach, we get the versions included when updating a single extension.

Fixes #6483

@despreston
despreston requested a review from a team as a code owner November 21, 2022 20:57
@despreston
despreston requested review from mislav and removed request for a team November 21, 2022 20:57
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Nov 21, 2022
Comment thread pkg/cmd/extension/command.go Outdated
fmt.Fprintf(io.Out, "%s %s upgraded extension %s\n", cs.SuccessIcon(), successStr, name)
} else {
} else if name == "" {
fmt.Fprintf(io.Out, "%s %s upgraded extensions\n", cs.SuccessIcon(), successStr)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about displaying this message even if the extension name is provided? We can use the text.Pluralize helper to make it extension or extensions.

@samcoe samcoe self-assigned this Dec 5, 2022

@samcoe samcoe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the contribution @despreston! I pushed a small commit that made the change I suggested the other day as well as removed the special case error handling for upToDateError since there are no longer any code paths that return it from manager.Upgrade.

@samcoe
samcoe enabled auto-merge (squash) December 8, 2022 14:35
@samcoe
samcoe merged commit 23913ac into cli:trunk Dec 8, 2022
@despreston
despreston deleted the des-6483-vers branch December 8, 2022 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

show version changes when upgrading a single extension

3 participants