Server changes/Sonarr

This commit is contained in:
ponzischeme89
2026-07-27 21:06:51 +12:00
parent 62f6345a40
commit 8d6cf2f5a1
42 changed files with 2388 additions and 284 deletions
+4 -3
View File
@@ -52,12 +52,13 @@ if ($Version) {
# Same scheme as app/build.gradle.kts: major*10000 + minor*100 + patch.
$code = [int]$parts[0] * 10000 + [int]$parts[1] * 100 + [int]$parts[2]
$gradle = $gradle -replace 'versionCode = \d+', "versionCode = $code"
$gradle = $gradle -replace 'versionName = "[^"]*"', "versionName = `"$Version`""
$gradle = $gradle -replace 'val defaultVersionName = "[^"]*"', "val defaultVersionName = `"$Version`""
Set-Content -LiteralPath $gradleFile -Value $gradle -NoNewline
Write-Host "Set version $Version (versionCode $code)" -ForegroundColor Cyan
} else {
if ($gradle -notmatch 'versionName = "([^"]*)"') { throw 'Could not read versionName from app/build.gradle.kts' }
if ($gradle -notmatch 'val defaultVersionName = "([^"]*)"') {
throw 'Could not read defaultVersionName from app/build.gradle.kts'
}
$Version = $Matches[1]
Write-Host "Building existing version $Version" -ForegroundColor Cyan
}