Oneliner to compare software versions
Oneliner to compare software versions for Vault on Github
Oneliner to compare software versions
1
2
3
4
5
6
export _tags=$(git tag --list | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
export _current=$(curl -s https://api.github.com/repos/hashicorp/vault/releases | \
jq -r '[.[] | select(.prerelease != true) | .name ] | first' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
[[ $_tags =~ $_current ]] && echo "match" || echo "no match"
Links:
202403041403
This post is licensed under CC BY 4.0 by the author.
