Skip to content

Commit 2e0e55c

Browse files
committed
Enhance k0s_sort with list and upgrade commands
1 parent 206499f commit 2e0e55c

File tree

2 files changed

+451
-69
lines changed

2 files changed

+451
-69
lines changed

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,24 @@ The resulting slice contains the latest patch of each intermediate minor and the
157157

158158
### `k0s_sort` executable
159159

160-
A command-line interface to the package. Can be used to sort lists of versions or to obtain the latest version number.
160+
A command-line interface to the package. It can sort version lists, fetch released tags from GitHub, and compute upgrade paths.
161161

162162
```console
163163
Usage: k0s_sort [options] [filename ...]
164-
-l only print the latest version
165-
-o print the latest version from online
164+
-a list released versions from GitHub (stable only, honours cache)
165+
-A list released versions from GitHub including prereleases
166+
-d print version delta instead of upgrade path output
167+
-l only print the latest version (works with input or together with -a/-A)
166168
-s omit prerelease versions
169+
-u require up-to-date online data
167170
-v print k0s_sort version
171+
172+
Examples:
173+
k0s_sort "v1.24.0...stable"
174+
k0s_sort -d "v1.24.0...v1.26.1"
175+
k0s_sort -a ">= v1.25.0"
176+
k0s_sort -u -a -l
177+
cat versions.txt | k0s_sort -s -l
168178
```
169179

170180

0 commit comments

Comments
 (0)