add -NoUpdate parameter
This commit is contained in:
parent
d6de2f9411
commit
56a27f6b9f
1 changed files with 10 additions and 7 deletions
17
revanced.ps1
17
revanced.ps1
|
@ -1,6 +1,7 @@
|
||||||
Param(
|
Param(
|
||||||
[string]$Java = 'java',
|
[string]$Java = 'java',
|
||||||
[switch]$NoDeploy
|
[switch]$NoDeploy,
|
||||||
|
[switch]$NoUpdate
|
||||||
)
|
)
|
||||||
|
|
||||||
Add-Type -AssemblyName System.Windows.Forms
|
Add-Type -AssemblyName System.Windows.Forms
|
||||||
|
@ -299,13 +300,15 @@ function main {
|
||||||
|
|
||||||
# Update
|
# Update
|
||||||
|
|
||||||
$updatedPatches = UpdateFromGithub -Repository "revanced/revanced-patches" -Config $config -AssetsFilter {$_.content_type -like "application/java-archive"} -OutFile ".\app\revanced-patches.jar"
|
if (-not $NoUpdate) {
|
||||||
if ($updatedPatches) {
|
$updatedPatches = UpdateFromGithub -Repository "revanced/revanced-patches" -Config $config -AssetsFilter {$_.content_type -like "application/java-archive"} -OutFile ".\app\revanced-patches.jar"
|
||||||
Invoke-WebRequest "https://raw.githubusercontent.com/revanced/revanced-patches/main/patches.json" -OutFile ".\app\revanced-patches.json"
|
if ($updatedPatches) {
|
||||||
}
|
Invoke-WebRequest "https://raw.githubusercontent.com/revanced/revanced-patches/main/patches.json" -OutFile ".\app\revanced-patches.json"
|
||||||
|
}
|
||||||
|
|
||||||
UpdateFromGithub -Repository "revanced/revanced-integrations" -Config $config -AssetsFilter {$_.content_type -like "application/*"} -OutFile ".\app\app-release-unsigned.apk" | Out-Null
|
UpdateFromGithub -Repository "revanced/revanced-integrations" -Config $config -AssetsFilter {$_.content_type -like "application/*"} -OutFile ".\app\app-release-unsigned.apk" | Out-Null
|
||||||
UpdateFromGithub -Repository "revanced/revanced-cli" -Config $config -AssetsFilter {$_.content_type -like "application/*"} -OutFile ".\app\revanced-cli.jar" | Out-Null
|
UpdateFromGithub -Repository "revanced/revanced-cli" -Config $config -AssetsFilter {$_.content_type -like "application/*"} -OutFile ".\app\revanced-cli.jar" | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
if ($NoDeploy) {return}
|
if ($NoDeploy) {return}
|
||||||
|
|
||||||
|
|
Reference in a new issue