Commit 12f931e
authored
Sort version output of
# Description of Changes
The output of `spacetime version list` is sorted in alphabetical order,
which is not the correct semver order.
This fixes the order printed, by sorting correctly.
Example before:
```
1.11.0
1.9.0
1.3.0
1.3.1
1.1.2
1.12.0 (current)
1.0.0
```
After:
```
1.12.0 (current)
1.11.0
1.9.0
1.3.1
1.3.0
1.1.2
1.0.0
```
# API and ABI breaking changes
Not an API or ABI breaking change
# Expected complexity level and risk
1
# Testing
Ran `spacetime version list` and `spacetime version list --all` with the
new code and confirmed that the result was correctly sorted.
I additionally tested that if the latest available version was not
installed that it would show with the upgrade hint command.spacetime version list (#4250)1 parent 8706349 commit 12f931e
1 file changed
Lines changed: 22 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
45 | 51 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
49 | 55 | | |
50 | | - | |
51 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
52 | 70 | | |
53 | 71 | | |
54 | 72 | | |
0 commit comments