Update workflow scripts

Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com>
This commit is contained in:
2024-03-31 12:42:43 +07:00
parent 82cfc6d1f6
commit 096c05b8cf
2 changed files with 6 additions and 7 deletions

View File

@@ -1,11 +1,10 @@
# Get latest supported YouTube client version via ReVanced JSON
# It will let us to download always latest YouTube apk supported by ReVanced team
# https://github.com/revanced/revanced-patches/blob/main/patches.json
# Get the latest supported YouTube version to patch
# https://api.revanced.app/docs/swagger
$Parameters = @{
Uri = "https://raw.githubusercontent.com/revanced/revanced-patches/main/patches.json"
Uri = "https://api.revanced.app/v2/patches/latest"
UseBasicParsing = $true
}
$JSON = Invoke-RestMethod @Parameters
$JSON = (Invoke-RestMethod @Parameters).patches
$versions = ($JSON | Where-Object -FilterScript {$_.compatiblePackages.name -eq "com.google.android.youtube"}).compatiblePackages.versions
$LatestSupported = $versions | Sort-Object -Descending -Unique | Select-Object -First 1