From 87290740a5e9c06e9a4f80ff3dd5441f827edcfc Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Fri, 23 Sep 2022 00:39:44 +0300 Subject: [PATCH] Create ReVanced_Patches.ps1 --- Scripts/ReVanced_Patches.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Scripts/ReVanced_Patches.ps1 diff --git a/Scripts/ReVanced_Patches.ps1 b/Scripts/ReVanced_Patches.ps1 new file mode 100644 index 0000000..452c70c --- /dev/null +++ b/Scripts/ReVanced_Patches.ps1 @@ -0,0 +1,18 @@ + +# https://github.com/revanced/revanced-patches +$Parameters = @{ + Uri = "https://api.github.com/repos/revanced/revanced-patches/releases/latest" + UseBasicParsing = $true + Verbose = $true +} +$Patchesvtag = (Invoke-RestMethod @Parameters).tag_name +$Patchestag = $Patchesvtag.replace("v", "") +$Parameters = @{ + Uri = "https://github.com/revanced/revanced-patches/releases/download/$Patchesvtag/revanced-patches-$Patchestag.jar" + Outfile = "$PSScriptRoot\revanced-patches.jar" + UseBasicParsing = $true + Verbose = $true +} +Invoke-RestMethod @Parameters + +echo "Patchesvtag=$Patchesvtag" >> $env:GITHUB_ENV