Skip to content

Commit ff7181a

Browse files
authored
Update gnome-extensions-unverified.sh to fix latest version detection
1 parent fd65765 commit ff7181a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/gnome-extensions-unverified/gnome-extensions-unverified.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ for INSTALL_EXT in "${INSTALL[@]}"; do
5353
exit 1
5454
fi
5555
# Gets latest extension version for latest available Gnome version
56-
SUITABLE_VERSION=$(echo "${QUERIED_EXT}" | jq -r '.shell_version_map | to_entries | max_by(.key | tonumber) | .value.version')
56+
SUITABLE_VERSION=$(echo "${QUERIED_EXT}" | jq -r '.shell_version_map | to_entries | sort_by(.key) | last | .value.version')
5757
else
5858
# PK ID extension config fallback if specified
5959
URL_QUERY=$(curl -sf "https://extensions.gnome.org/extension-info/?pk=${INSTALL_EXT}")
@@ -67,7 +67,7 @@ for INSTALL_EXT in "${INSTALL[@]}"; do
6767
EXT_UUID=$(echo "${URL_QUERY}" | jq -r '.["uuid"]')
6868
EXT_NAME=$(echo "${URL_QUERY}" | jq -r '.["name"]')
6969
# Gets latest extension version for latest available Gnome version
70-
SUITABLE_VERSION=$(echo "${URL_QUERY}" | jq -r '.shell_version_map | to_entries | max_by(.key | tonumber) | .value.version')
70+
SUITABLE_VERSION=$(echo "${URL_QUERY}" | jq -r '.shell_version_map | to_entries | sort_by(.key) | last | .value.version')
7171
fi
7272
# Removes every @ symbol from UUID, since extension URL doesn't contain @ symbol
7373
URL="https://extensions.gnome.org/extension-data/${EXT_UUID//@/}.v${SUITABLE_VERSION}.shell-extension.zip"

0 commit comments

Comments
 (0)