Add changelog link
This commit is contained in:
parent
448f0d11eb
commit
75bff43232
1 changed files with 9 additions and 15 deletions
24
revanced.ps1
24
revanced.ps1
|
@ -116,12 +116,6 @@ function main {
|
||||||
$integrationsRelease = ConvertFrom-Json (Invoke-WebRequest https://api.github.com/repos/revanced/revanced-integrations/releases/latest).Content
|
$integrationsRelease = ConvertFrom-Json (Invoke-WebRequest https://api.github.com/repos/revanced/revanced-integrations/releases/latest).Content
|
||||||
$cliRelease = ConvertFrom-Json (Invoke-WebRequest https://api.github.com/repos/revanced/revanced-cli/releases/latest).Content
|
$cliRelease = ConvertFrom-Json (Invoke-WebRequest https://api.github.com/repos/revanced/revanced-cli/releases/latest).Content
|
||||||
|
|
||||||
$gitHubVersions = [PSCustomObject]@{
|
|
||||||
patches = $patchesRelease.tag_name
|
|
||||||
integrations = $integrationsRelease.tag_name
|
|
||||||
cli = $cliRelease.tag_name
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check versions
|
# Check versions
|
||||||
|
|
||||||
[Bool[]]$install = $true, $true, $true
|
[Bool[]]$install = $true, $true, $true
|
||||||
|
@ -129,9 +123,9 @@ function main {
|
||||||
try {
|
try {
|
||||||
$config.load(".\config.json")
|
$config.load(".\config.json")
|
||||||
|
|
||||||
if ($config.patches -eq $githubVersions.patches) {$install[0] = $false}
|
if ($config.patches -eq $patchesRelease.tag_name) {$install[0] = $false}
|
||||||
if ($config.integrations -eq $gitHubVersions.integrations) {$install[1] = $false}
|
if ($config.integrations -eq $integrationsRelease.tag_name) {$install[1] = $false}
|
||||||
if ($config.cli -eq $gitHubVersions.cli) {$install[2] = $false}
|
if ($config.cli -eq $cliRelease.tag_name) {$install[2] = $false}
|
||||||
}
|
}
|
||||||
catch [System.Management.Automation.ItemNotFoundException] {
|
catch [System.Management.Automation.ItemNotFoundException] {
|
||||||
Write-Output "currentVersion.json not found, downloading everything"
|
Write-Output "currentVersion.json not found, downloading everything"
|
||||||
|
@ -142,21 +136,21 @@ function main {
|
||||||
New-Item -type Directory -Path ".\app" -ErrorAction SilentlyContinue | Out-Null
|
New-Item -type Directory -Path ".\app" -ErrorAction SilentlyContinue | Out-Null
|
||||||
|
|
||||||
if ($install[0]) {
|
if ($install[0]) {
|
||||||
Write-Output "Downloading Patches ($($config.patches) -> $($gitHubVersions.patches))"
|
Write-Output "Downloading Patches ($($config.patches) -> $($patchesRelease.tag_name)) changelog: $($patchesRelease.html_url)"
|
||||||
Invoke-WebRequest $patchesRelease.assets[1].browser_download_url -OutFile ".\app\revanced-patches.jar"
|
Invoke-WebRequest $patchesRelease.assets[1].browser_download_url -OutFile ".\app\revanced-patches.jar"
|
||||||
$config.patches = $gitHubVersions.patches
|
$config.patches = $patchesRelease.tag_name
|
||||||
}
|
}
|
||||||
else {Write-Output "Patches up to date $($config.patches)"}
|
else {Write-Output "Patches up to date $($config.patches)"}
|
||||||
if ($install[1]) {
|
if ($install[1]) {
|
||||||
Write-Output "Downloading Integrations ($($config.integrations) -> $($gitHubVersions.integrations))"
|
Write-Output "Downloading Integrations ($($config.integrations) -> $($integrationsRelease.tag_name)) changelog: $($integrationsRelease.html_url)"
|
||||||
Invoke-WebRequest $integrationsRelease.assets[0].browser_download_url -OutFile ".\app\app-release-unsigned.apk"
|
Invoke-WebRequest $integrationsRelease.assets[0].browser_download_url -OutFile ".\app\app-release-unsigned.apk"
|
||||||
$config.integrations = $gitHubVersions.integrations
|
$config.integrations = $integrationsRelease.tag_name
|
||||||
}
|
}
|
||||||
else {Write-Output "Integrations up to date $($config.integrations)"}
|
else {Write-Output "Integrations up to date $($config.integrations)"}
|
||||||
if ($install[2]) {
|
if ($install[2]) {
|
||||||
Write-Output "Downloading cli ($($config.cli) -> $($gitHubVersions.cli))"
|
Write-Output "Downloading cli ($($config.cli) -> $($cliRelease.tag_name)) changelog: $($cliRelease.html_url)"
|
||||||
Invoke-WebRequest $cliRelease.assets[0].browser_download_url -OutFile ".\app\revanced-cli.jar"
|
Invoke-WebRequest $cliRelease.assets[0].browser_download_url -OutFile ".\app\revanced-cli.jar"
|
||||||
$config.cli = $gitHubVersions.cli
|
$config.cli = $cliRelease.tag_name
|
||||||
}
|
}
|
||||||
else {Write-Output "cli up to date! $($config.cli)"}
|
else {Write-Output "cli up to date! $($config.cli)"}
|
||||||
|
|
||||||
|
|
Reference in a new issue