refactor: use the new utils.ps1 script for operations
This commit is contained in:
@@ -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 = @"
|
||||
|
||||
Reference in New Issue
Block a user