From c34e8886b8d5ccc50d1e849c5de5dc5f50a76fb7 Mon Sep 17 00:00:00 2001 From: Mateusz Jakubiec Date: Mon, 15 Nov 2021 11:17:56 +0100 Subject: [PATCH 1/3] DXE-71 CLI upgrade mechanism: show link to GitHub --- pkg/commands/command_upgrade_test.go | 9 ++++++--- pkg/commands/upgrade.go | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/commands/command_upgrade_test.go b/pkg/commands/command_upgrade_test.go index 934f21e..f6b96b3 100644 --- a/pkg/commands/command_upgrade_test.go +++ b/pkg/commands/command_upgrade_test.go @@ -43,7 +43,8 @@ func TestCmdUpgrade(t *testing.T) { m.term.On("Spinner").Return(m.term).Once() m.term.On("Stop", terminal.SpinnerStatusOK).Return().Once() - m.term.On("Confirm", fmt.Sprintf("New upgrade found: 10.0.0 (you are running: %s). Upgrade now? [Y/n]: ", version.Version), true).Return(true, nil).Once() + m.term.On("Writeln", []interface{}{"You can find more details about the new version here: https://github.com/akamai/cli/releases"}).Return(0, nil).Once() + m.term.On("Confirm", fmt.Sprintf("New update found: 10.0.0. You are running: %s. Upgrade now?", version.Version), true).Return(true, nil).Once() // start upgrade m.term.On("Spinner").Return(m.term).Once() @@ -72,7 +73,8 @@ func TestCmdUpgrade(t *testing.T) { m.term.On("Spinner").Return(m.term).Once() m.term.On("Stop", terminal.SpinnerStatusOK).Return().Once() - m.term.On("Confirm", fmt.Sprintf("New upgrade found: 10.0.0 (you are running: %s). Upgrade now? [Y/n]: ", version.Version), true).Return(true, nil).Once() + m.term.On("Writeln", []interface{}{"You can find more details about the new version here: https://github.com/akamai/cli/releases"}).Return(0, nil).Once() + m.term.On("Confirm", fmt.Sprintf("New update found: 10.0.0. You are running: %s. Upgrade now?", version.Version), true).Return(true, nil).Once() // start upgrade m.term.On("Spinner").Return(m.term).Once() @@ -101,7 +103,8 @@ func TestCmdUpgrade(t *testing.T) { m.term.On("Spinner").Return(m.term).Once() m.term.On("Stop", terminal.SpinnerStatusOK).Return().Once() - m.term.On("Confirm", fmt.Sprintf("New upgrade found: 10.0.0 (you are running: %s). Upgrade now? [Y/n]: ", version.Version), true).Return(true, nil).Once() + m.term.On("Writeln", []interface{}{"You can find more details about the new version here: https://github.com/akamai/cli/releases"}).Return(0, nil).Once() + m.term.On("Confirm", fmt.Sprintf("New update found: 10.0.0. You are running: %s. Upgrade now?", version.Version), true).Return(true, nil).Once() // start upgrade m.term.On("Spinner").Return(m.term).Once() diff --git a/pkg/commands/upgrade.go b/pkg/commands/upgrade.go index 0a42270..ba62f19 100644 --- a/pkg/commands/upgrade.go +++ b/pkg/commands/upgrade.go @@ -86,8 +86,9 @@ func CheckUpgradeVersion(ctx context.Context, force bool) string { comp := version.Compare(version.Version, latestVersion) if comp == 1 { term.Spinner().Stop(terminal.SpinnerStatusOK) + _, _ = term.Writeln("You can find more details about the new version here: https://github.com/akamai/cli/releases") if answer, err := term.Confirm(fmt.Sprintf( - "New upgrade found: %s (you are running: %s). Upgrade now? [Y/n]: ", + "New update found: %s. You are running: %s. Upgrade now?", color.BlueString(latestVersion), color.BlueString(version.Version), ), true); err != nil || !answer { From b929d2daaebe7c520a5c4c05c0d311cbf47447a1 Mon Sep 17 00:00:00 2001 From: Tatiana Slonimskaia Date: Wed, 1 Dec 2021 16:05:52 +0100 Subject: [PATCH 2/3] DXE-116 Added release documentation --- CHANGELOG.md | 5 +++++ pkg/version/version.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e5db9d..f7fe97e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.3.1 (December 6, 2021) + +## Enhancements +* Improved message for updating CLI version + # 1.3.0 (October 6, 2021) ## Fixes diff --git a/pkg/version/version.go b/pkg/version/version.go index 23ea277..dbd0bf4 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -4,7 +4,7 @@ import "github.com/Masterminds/semver" const ( // Version Application Version - Version = "1.3.0" + Version = "1.3.1" ) // Compare ... From 621ffa307cf8f2f9e6af2e0ded873442752572da Mon Sep 17 00:00:00 2001 From: Tatiana Slonimskaia Date: Thu, 2 Dec 2021 11:50:02 +0100 Subject: [PATCH 3/3] DXE-116 Changed release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7fe97e..65b9732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -# 1.3.1 (December 6, 2021) +# 1.3.1 (December 8, 2021) ## Enhancements * Improved message for updating CLI version