Eliminate platform-specific command duplication in backend.yml by introducing GRADLE/TEST/FORMAT/CLEAN variables. Reorganize test, format, and format:check tasks into matrix patterns that explicitly test all flavor/security combinations. Add PowerShell script for reliable version extraction on Windows.
10 lines
226 B
PowerShell
10 lines
226 B
PowerShell
$ErrorActionPreference = 'Stop'
|
|
|
|
$output = & "$PSScriptRoot/../gradlew.bat" printVersion --quiet 2>&1
|
|
$lines = @($output | Where-Object { $_.ToString().Trim() })
|
|
if ($lines.Count -eq 0) {
|
|
exit 0
|
|
}
|
|
|
|
Write-Output $lines[-1]
|