grafanaPlugins: prefer per-platform hashes to 'any'
Some packages have both per-platform _and_ an 'any' packages (e.g. grafana-clickhouse-datasource) and the update script fails for those cases. Prefer the per-platform packages if available.
This commit is contained in:
@@ -35,8 +35,8 @@ update() {
|
||||
update-source-version $system "grafanaPlugins.${plugin_name}" "$latest_version" "$hash"
|
||||
}
|
||||
|
||||
if echo "$api_response" | jq -e .packages.any > /dev/null; then
|
||||
# the package contains an "any" package, so there should be only one zipHash.
|
||||
if echo "$api_response" | jq -e '.packages | select(length == 1) | .any' > /dev/null; then
|
||||
# the package only contains an "any" package, so there should be only one zipHash.
|
||||
update "any"
|
||||
else
|
||||
update "linux-amd64" "x86_64-linux"
|
||||
|
||||
Reference in New Issue
Block a user