From 0106b5861b641d72b6d7c21d4beaad98e5dfd49f Mon Sep 17 00:00:00 2001 From: Lev Rusanov <30170278+JDM170@users.noreply.github.com> Date: Tue, 7 Feb 2023 15:42:14 +0700 Subject: [PATCH] Update files Signed-off-by: Lev Rusanov <30170278+JDM170@users.noreply.github.com> --- .github/workflows/Build.yml | 7 ++++++- Build.ps1 | 20 ++++++++++---------- Scripts/MicroG.ps1 | 14 ++++++++------ Scripts/ReVanced_CLI.ps1 | 9 +++++---- Scripts/ReVanced_Intergrations.ps1 | 8 ++++---- Scripts/Zulu_JDK.ps1 | 4 ++-- 6 files changed, 35 insertions(+), 27 deletions(-) diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml index 4b2f414..193a1ad 100644 --- a/.github/workflows/Build.yml +++ b/.github/workflows/Build.yml @@ -52,13 +52,18 @@ jobs: --apk "Temp\youtube.apk" ` --bundle "Temp\revanced-patches.jar" ` --merge "Temp\revanced-integrations.apk" ` - --exclude hide-time-and-seekbar --exclude always-autorepeat --exclude hide-captions-button --exclude disable-fullscreen-panels --exclude old-quality-layout ` + --exclude hide-time-and-seekbar ` + --exclude always-autorepeat ` + --exclude hide-captions-button ` + --exclude disable-fullscreen-panels ` + --exclude old-quality-layout ` --clean ` --temp-dir "Temp\Temp" ` --out "Temp\revanced.apk" - name: Creating archive run: | + Get-ChildItem Temp\Temp -Recurse -Force $Parameters = @{ Path = "Temp\revanced.apk", "Temp\microg.apk" DestinationPath = "ReVanced.zip" diff --git a/Build.ps1 b/Build.ps1 index 93f30c8..adbd2fb 100644 --- a/Build.ps1 +++ b/Build.ps1 @@ -71,10 +71,9 @@ $Parameters = @{ UseBasicParsing = $true Verbose = $true } -$Tag = (Invoke-RestMethod @Parameters).tag_name -$Tag2 = $Tag.replace("v", "") +$URL = (Invoke-RestMethod @Parameters).assets.browser_download_url $Parameters = @{ - Uri = "https://github.com/revanced/revanced-cli/releases/download/$Tag/revanced-cli-$Tag2-all.jar" + Uri = $URL Outfile = "$WorkingFolder\ReVanced\revanced-cli.jar" UseBasicParsing = $true Verbose = $true @@ -103,11 +102,8 @@ $Parameters = @{ UseBasicParsing = $true Verbose = $true } -# $Tag = (Invoke-RestMethod @Parameters).tag_name -# $Tag2 = $Tag.replace("v", "") $URL = (Invoke-RestMethod @Parameters).assets.browser_download_url $Parameters = @{ - # Uri = "https://github.com/revanced/revanced-integrations/releases/download/$Tag/revanced-integrations-$Tag2.apk" Uri = $URL Outfile = "$WorkingFolder\ReVanced\revanced-integrations.apk" UseBasicParsing = $true @@ -121,9 +117,9 @@ $Parameters = @{ UseBasicParsing = $true Verbose = $true } -$Tag = (Invoke-RestMethod @Parameters).tag_name +$URL = (Invoke-RestMethod @Parameters).assets.browser_download_url $Parameters = @{ - Uri = "https://github.com/TeamVanced/VancedMicroG/releases/download/$Tag/microg.apk" + Uri = $URL Outfile = "$WorkingFolder\ReVanced\microg.apk" UseBasicParsing = $true Verbose = $true @@ -162,7 +158,11 @@ Remove-Item -Path "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip" -Force --apk "$WorkingFolder\ReVanced\youtube.apk" ` --bundle "$WorkingFolder\ReVanced\revanced-patches.jar" ` --merge "$WorkingFolder\ReVanced\revanced-integrations.apk" ` ---exclude hide-time-and-seekbar --exclude always-autorepeat --exclude hide-captions-button --exclude disable-fullscreen-panels --exclude old-quality-layout ` +--exclude hide-time-and-seekbar ` +--exclude always-autorepeat ` +--exclude hide-captions-button ` +--exclude disable-fullscreen-panels ` +--exclude old-quality-layout ` --clean ` --temp-dir "$WorkingFolder\ReVanced\Temp" ` --out "$WorkingFolder\ReVanced\revanced.apk" @@ -171,6 +171,6 @@ Remove-Item -Path "$WorkingFolder\ReVanced\jdk_windows-x64_bin.zip" -Force # Invoke-Item -Path "$WorkingFolder\ReVanced" # Remove temp directory, because cli failed to clean up directory -Remove-Item -Path "$WorkingFolder\ReVanced\Temp" -Recurse -Force -Confirm:$false +# Remove-Item -Path "$WorkingFolder\ReVanced\Temp" -Recurse -Force -Confirm:$false Write-Warning -Message "Latest available revanced.apk & microg.apk are ready in `"$WorkingFolder\ReVanced`"" diff --git a/Scripts/MicroG.ps1 b/Scripts/MicroG.ps1 index 891dad7..2bfb642 100644 --- a/Scripts/MicroG.ps1 +++ b/Scripts/MicroG.ps1 @@ -4,13 +4,15 @@ $Parameters = @{ UseBasicParsing = $true Verbose = $true } -$MicroGTag = (Invoke-RestMethod @Parameters).tag_name +$apiResult = Invoke-RestMethod @Parameters +$URL = $apiResult.assets.browser_download_url +$TAG = $apiResult.tag_name $Parameters = @{ - Uri = "https://github.com/TeamVanced/VancedMicroG/releases/download/$MicroGTag/microg.apk" - Outfile = "Temp\microg.apk" - UseBasicParsing = $true - Verbose = $true + Uri = $URL + Outfile = "Temp\microg.apk" + UseBasicParsing = $true + Verbose = $true } Invoke-RestMethod @Parameters -echo "MicroGTag=$MicroGTag" >> $env:GITHUB_ENV +echo "MicroGTag=$TAG" >> $env:GITHUB_ENV diff --git a/Scripts/ReVanced_CLI.ps1 b/Scripts/ReVanced_CLI.ps1 index 91bb7fd..029df16 100644 --- a/Scripts/ReVanced_CLI.ps1 +++ b/Scripts/ReVanced_CLI.ps1 @@ -4,14 +4,15 @@ $Parameters = @{ UseBasicParsing = $true Verbose = $true } -$CLIvtag = (Invoke-RestMethod @Parameters).tag_name -$CLItag = $CLIvtag.replace("v", "") +$apiResult = Invoke-RestMethod @Parameters +$URL = $apiResult.assets.browser_download_url +$TAG = $apiResult.tag_name $Parameters = @{ - Uri = "https://github.com/revanced/revanced-cli/releases/download/$CLIvtag/revanced-cli-$CLItag-all.jar" + Uri = $URL Outfile = "Temp\revanced-cli.jar" UseBasicParsing = $true Verbose = $true } Invoke-RestMethod @Parameters -echo "CLIvtag=$CLIvtag" >> $env:GITHUB_ENV +echo "CLIvtag=$TAG" >> $env:GITHUB_ENV diff --git a/Scripts/ReVanced_Intergrations.ps1 b/Scripts/ReVanced_Intergrations.ps1 index 39da929..2158502 100644 --- a/Scripts/ReVanced_Intergrations.ps1 +++ b/Scripts/ReVanced_Intergrations.ps1 @@ -5,14 +5,14 @@ $Parameters = @{ Verbose = $true } $apiResult = Invoke-RestMethod @Parameters -$IntegrationsTag = $apiResult.tag_name +$URL = $apiResult.assets.browser_download_url +$TAG = $apiResult.tag_name $Parameters = @{ - # Uri = "https://github.com/revanced/revanced-integrations/releases/download/$Tag/revanced-integrations-$Tag2.apk" - Uri = $apiResult.assets.browser_download_url + Uri = $URL Outfile = "Temp\revanced-integrations.apk" UseBasicParsing = $true Verbose = $true } Invoke-RestMethod @Parameters -echo "IntegrationsTag=$IntegrationsTag" >> $env:GITHUB_ENV +echo "IntegrationsTag=$TAG" >> $env:GITHUB_ENV diff --git a/Scripts/Zulu_JDK.ps1 b/Scripts/Zulu_JDK.ps1 index 29ebba9..89091d0 100644 --- a/Scripts/Zulu_JDK.ps1 +++ b/Scripts/Zulu_JDK.ps1 @@ -6,7 +6,7 @@ $Parameters = @{ } $apiResult = Invoke-RestMethod @Parameters $URL = $apiResult.architecture."64bit".url -$ZuluTag = $apiResult.version +$TAG = $apiResult.version $Parameters = @{ Uri = $URL Outfile = "Temp\jdk_windows-x64_bin.zip" @@ -15,7 +15,7 @@ $Parameters = @{ } Invoke-RestMethod @Parameters -echo "ZuluTag=$ZuluTag" >> $env:GITHUB_ENV +echo "ZuluTag=$TAG" >> $env:GITHUB_ENV Write-Verbose -Message "Expanding Zulu JDK" -Verbose