Add changelog link

This commit is contained in:
Wroclaw 2022-07-04 22:41:42 +02:00
parent 448f0d11eb
commit b86a142e0e

View file

@ -116,12 +116,6 @@ function main {
$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
$gitHubVersions = [PSCustomObject]@{
patches = $patchesRelease.tag_name
integrations = $integrationsRelease.tag_name
cli = $cliRelease.tag_name
}
# Check versions
[Bool[]]$install = $true, $true, $true
@ -129,9 +123,9 @@ function main {
try {
$config.load(".\config.json")
if ($config.patches -eq $githubVersions.patches) {$install[0] = $false}
if ($config.integrations -eq $gitHubVersions.integrations) {$install[1] = $false}
if ($config.cli -eq $gitHubVersions.cli) {$install[2] = $false}
if ($config.patches -eq$patchesRelease.tag_name) {$install[0] = $false}
if ($config.integrations -eq$integrationsRelease.tag_name) {$install[1] = $false}
if ($config.cli -eq $cliRelease.tag_name) {$install[2] = $false}
}
catch [System.Management.Automation.ItemNotFoundException] {
Write-Output "currentVersion.json not found, downloading everything"
@ -142,21 +136,21 @@ function main {
New-Item -type Directory -Path ".\app" -ErrorAction SilentlyContinue | Out-Null
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"
$config.patches = $gitHubVersions.patches
$config.patches = $patchesRelease.tag_name
}
else {Write-Output "Patches up to date $($config.patches)"}
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"
$config.integrations = $gitHubVersions.integrations
$config.integrations = $integrationsRelease.tag_name
}
else {Write-Output "Integrations up to date $($config.integrations)"}
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"
$config.cli = $gitHubVersions.cli
$config.cli = $cliRelease.tag_name
}
else {Write-Output "cli up to date! $($config.cli)"}