refactor: use the new utils.ps1 script for operations

This commit is contained in:
Bjarke Sporring
2026-01-21 10:51:59 +01:00
parent 5582b9fcbd
commit 4b9d2449c8
8 changed files with 164 additions and 311 deletions

View File

@@ -10,6 +10,8 @@
the bug fixes to the main branch.
#>
. "$PSScriptRoot\..\..\util.ps1"
# Remove existing challenge directory if present
if (Test-Path "challenge") {
Write-Host "Removing existing challenge directory..." -ForegroundColor Yellow
@@ -42,11 +44,7 @@ git add app.py
git commit -m "Initial app implementation" | Out-Null
# Detect the main branch name after first commit
$mainBranch = git branch --show-current
if (-not $mainBranch) {
$mainBranch = git config --get init.defaultBranch
if (-not $mainBranch) { $mainBranch = "main" }
}
$mainBranch = Get-MainBranch
Write-Host "Default branch detected: $mainBranch" -ForegroundColor Yellow
$readme = @"