fix: cherry-pick conflict

This commit is contained in:
Bjarke Sporring
2026-01-15 15:20:32 +01:00
parent 988ce3bc92
commit 1c20a06c21
2 changed files with 32 additions and 34 deletions

View File

@@ -77,7 +77,7 @@ if ($mainCommitCount -ne 4) {
} else {
Write-Host "Hint: You should cherry-pick ONLY the 2 bug fix commits, not all commits" -ForegroundColor Yellow
}
Write-Host "`nExpected commits on $mainBranch:" -ForegroundColor Yellow
Write-Host "`nExpected commits on ${mainBranch}:" -ForegroundColor Yellow
Write-Host " 1. Initial app implementation" -ForegroundColor White
Write-Host " 2. Add README" -ForegroundColor White
Write-Host " 3. Fix security vulnerability in input validation (cherry-picked)" -ForegroundColor White
@@ -125,23 +125,32 @@ if (-not (Test-Path "app.py")) {
exit 1
}
# Check that app.py has the performance fix (cache) but NOT experimental features
$appContent = Get-Content "app.py" -Raw
# Should have cache (from performance fix)
if ($appContent -notmatch "cache") {
Write-Host "[FAIL] app.py is missing the performance fix (cache)." -ForegroundColor Red
# Check that cache.py exists (from performance fix)
if (-not (Test-Path "cache.py")) {
Write-Host "[FAIL] cache.py not found on $mainBranch branch." -ForegroundColor Red
Write-Host "Hint: You need to cherry-pick the 'Fix performance issue' commit" -ForegroundColor Yellow
Set-Location ..
exit 1
}
if ($appContent -notmatch "get_data") {
Write-Host "[FAIL] app.py is missing the get_data method from performance fix." -ForegroundColor Red
# Check that cache.py has the DataCache class
$cacheContent = Get-Content "cache.py" -Raw
if ($cacheContent -notmatch "DataCache") {
Write-Host "[FAIL] cache.py is missing the DataCache class." -ForegroundColor Red
Set-Location ..
exit 1
}
if ($cacheContent -notmatch "def get\(") {
Write-Host "[FAIL] cache.py is missing the get method." -ForegroundColor Red
Set-Location ..
exit 1
}
# Check that app.py does NOT have experimental features
$appContent = Get-Content "app.py" -Raw
# Should NOT have experimental features
if ($appContent -match "experimental_mode") {
Write-Host "[FAIL] app.py contains experimental features (experimental_mode)." -ForegroundColor Red