Skip to content

Commit

Permalink
Change the way get supported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
luxysiv authored Dec 22, 2024
1 parent 204f94a commit 79147ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions etc/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ get_latest_version() {

# Read highest supported versions from Revanced
get_supported_version() {
pkg_name="$1"
jq -r '.. | objects | select(.name == "'$pkg_name'" and .versions != null) | .versions[]' patches.json | max
package_name=$1
output=$(java -jar revanced-cli*.jar list-versions -f "$package_name" patch*.rvp)
version=$(echo "$output" | tail -n +3 | sed 's/ (.*)//' | grep -v -w "Any" | max | xargs)
echo "$version"
}

# Download necessary resources to patch from Github latest release
Expand Down

0 comments on commit 79147ff

Please sign in to comment.