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,6 +1,6 @@
# https://github.com/inotia00/VancedMicroG # https://github.com/ReVanced/GmsCore
$Parameters = @{ $Parameters = @{
Uri = "https://api.github.com/repos/inotia00/VancedMicroG/releases/latest" Uri = "https://api.github.com/repos/ReVanced/GmsCore/releases/latest"
UseBasicParsing = $true UseBasicParsing = $true
Verbose = $true Verbose = $true
} }

View File

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