Last active
February 24, 2024 01:31
-
-
Save zackbradys/a2335e93eb455715f460aa22dc83ec7f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for app in rke2; do | |
output=$(curl -ks "https://update.${app}.io/v1-release/channels" | jq --arg app "${app}" -r '.data[]|select(.id==("stable","latest","testing"))|[$app, .name, .latest]|@tsv') | |
[ -n "$output" ] && echo "$output" | |
done && echo | |
for app in k3s; do | |
output=$(curl -ks "https://update.${app}.io/v1-release/channels" | jq --arg app "${app}" -r '.data[]|select(.id==("stable","latest","testing"))|[$app, .name, .latest]|@tsv') | |
[ -n "$output" ] && echo "$output" | |
done && echo | |
for i in stable latest alpha; do | |
output=$(curl -s https://releases.rancher.com/server-charts/${i}/index.yaml | json_xs -f yaml -t json | jq --arg app ${i} -r '.entries.rancher[0]|[.name, $app, .version]|@tsv') | |
[ -n "$output" ] && echo "$output" | |
done && echo | |
output=$(curl -s https://api.github.com/repos/harvester/harvester/releases/latest | grep '"tag_name":' | sed 's/.*"v\([^"]*\)".*/\1/') | |
[ -n "$output" ] && echo -e "harvester stable $output" && echo | |
output=$(curl -s https://charts.longhorn.io/index.yaml | json_xs -f yaml -t json | jq -r '.entries.longhorn[0]|["longhorn", "stable", .version]|@tsv') | |
[ -n "$output" ] && echo "$output" && echo | |
output=$(curl -s https://neuvector.github.io/neuvector-helm/index.yaml | json_xs -f yaml -t json | jq -r '.entries.core[0]|["neuvector", "stable", .version]|@tsv') | |
[ -n "$output" ] && echo "$output" && echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
example use of the script:
curl -sfl https://gist.githubusercontent.com/zackbradys/a2335e93eb455715f460aa22dc83ec7f/raw/4d6196eee0b3b4db35a4e63a8aee83da652f17bf/rke2-version-check.sh | bash
example output: