refactor: use python instead of javascript

This commit is contained in:
Bjarke Sporring
2026-01-05 12:21:48 +01:00
parent e1b8d8418a
commit f11f5a4646
14 changed files with 550 additions and 735 deletions

View File

@@ -80,7 +80,7 @@ $mainCommitCount = (git rev-list --count main 2>$null)
if ($featureCommitCount -le $mainCommitCount) {
Write-Host "[FAIL] add-feature branch has no new commits." -ForegroundColor Red
Write-Host "Hint: Make changes to app.js and commit them on the add-feature branch" -ForegroundColor Yellow
Write-Host "Hint: Make changes to app.py and commit them on the add-feature branch" -ForegroundColor Yellow
Set-Location ../..
exit 1
}
@@ -103,20 +103,20 @@ Write-Host "[PASS] Feature branch pushed to remote!" -ForegroundColor Green
Set-Location ../local-repo
# Check if app.js has been modified
if (-not (Test-Path "app.js")) {
Write-Host "[FAIL] app.js not found." -ForegroundColor Red
# Check if app.py has been modified
if (-not (Test-Path "app.py")) {
Write-Host "[FAIL] app.py not found." -ForegroundColor Red
Set-Location ../..
exit 1
}
$appContent = Get-Content "app.js" -Raw
$appContent = Get-Content "app.py" -Raw
# Check for user's changes (should have added something)
$featureCommits = git log --pretty=format:"%s" add-feature 2>$null
if (-not ($featureCommits -match "stop|feature|add" -or $appContent -match "stop")) {
Write-Host "[FAIL] No new feature detected in app.js." -ForegroundColor Red
Write-Host "Hint: Add a new method (like 'stop') to app.js and commit it" -ForegroundColor Yellow
Write-Host "[FAIL] No new feature detected in app.py." -ForegroundColor Red
Write-Host "Hint: Add a new method (like 'stop') to app.py and commit it" -ForegroundColor Yellow
Set-Location ../..
exit 1
}