diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2024-07-06 13:58:59 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2024-07-06 13:58:59 +0200 |
| commit | b84d735b85e37a0a33d2722000245b63c263b723 (patch) | |
| tree | 7790e91ffdabd7c7bae9c90b647956a8f7b0ac5a /.jq | |
| parent | 3b7382a65fb079635e71414077e13e33633f036f (diff) | |
| download | dotfiles-b84d735b85e37a0a33d2722000245b63c263b723.tar.xz | |
Start versioning some jq tools
Serving suggestion:
> Can I use 'git branch --show-current' in that testsuite?
Documentation/RelNotes/2.22.0.txt
32: * "git branch" learned a new subcommand "--show-current".
> Well then which distros ship Git <2.22?
$ wget -O- https://repology.org/api/v1/project/git |
jq -r '
import "version" as version ;
map(select(.version | version::versionlt("2.22")))
| sort_by(.repo, (.version | version::toversion))
| map("\(.version)\t\(.repo)")
| .[]
' | column -ts$'\t'
Diffstat (limited to '.jq')
| -rw-r--r-- | .jq/version.jq | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.jq/version.jq b/.jq/version.jq new file mode 100644 index 0000000..d7d3d62 --- /dev/null +++ b/.jq/version.jq @@ -0,0 +1,5 @@ +def toversionnumber: try tonumber catch 0; + +def toversion: split(".") | map(toversionnumber); + +def versionlt(rhs): ( . | toversion) < ( rhs | toversion ); |
