Commit 6bcba6f
authored
CDTOOL-1235: Provide links to major version release notes in 'new version available' output. (#1623)
### Change summary
When the CLI informs the user that a newer version is available for
installation, it will now detect whether that new version is at least
one major version higher than the installed version. If it is, it will
provide the user links to the changelog (release notes) for each of the
major versions between the current version and the latest version. There
is no change in the output if the current version and latest version
have the same major version number.
---
Sample output (one major version behind):
```text
kpfleming@kpf25:~/src/fastly/cli$ ./fastly version
Fastly CLI version v12.1.0 (unknown)
Built with go version go1.25.5 linux/amd64 (2026-01-16)
A new version of the Fastly CLI is available.
Current version: 12.1.0
Latest version: 13.3.0
Note: Please review the release notes for the major version(s) listed below before upgrading.
Version 13.0.0: https://github.com/fastly/cli/releases/tag/v13.0.0
Run `fastly update` to get the latest version.
```
---
Sample output (multiple major versions behind):
```text
kpfleming@kpf25:~/src/fastly/cli$ ./fastly version
Fastly CLI version v10.1.0 (unknown)
Built with go version go1.25.5 linux/amd64 (2026-01-16)
A new version of the Fastly CLI is available.
Current version: 10.1.0
Latest version: 13.3.0
Note: Please review the release notes for the major versions listed below before upgrading.
Version 11.0.0: https://github.com/fastly/cli/releases/tag/v11.0.0
Version 12.0.0: https://github.com/fastly/cli/releases/tag/v12.0.0
Version 13.0.0: https://github.com/fastly/cli/releases/tag/v13.0.0
Run `fastly update` to get the latest version.
```
All Submissions:
* [X] Have you followed the guidelines in our Contributing document?
* [X] Have you checked to ensure there aren't other open [Pull
Requests](https://github.com/fastly/cli/pulls) for the same
update/change?
<!-- You can erase any parts of this template not applicable to your
Pull Request. -->
### New Feature Submissions:
* [ ] Does your submission pass tests?
### Changes to Core Features:
* [ ] Have you written new tests for your core changes, as applicable?
* [ ] Have you successfully run tests with your changes locally?1 parent fda0c07 commit 6bcba6f
2 files changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
69 | 75 | | |
70 | 76 | | |
71 | 77 | | |
| |||
0 commit comments