feat: add reset script to module 1
This commit is contained in:
29
module-01-basics/reset.ps1
Normal file
29
module-01-basics/reset.ps1
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Resets the Module 01 challenge environment.
|
||||
|
||||
.DESCRIPTION
|
||||
Removes the existing challenge directory and runs setup.ps1 to create a fresh challenge.
|
||||
This is useful if you want to start over from scratch.
|
||||
#>
|
||||
|
||||
Write-Host "Resetting Module 01: Git Basics Challenge..." -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Remove existing challenge directory if it exists
|
||||
if (Test-Path "challenge") {
|
||||
Write-Host "Removing existing challenge directory..." -ForegroundColor Yellow
|
||||
Remove-Item -Path "challenge" -Recurse -Force
|
||||
Write-Host "[SUCCESS] Challenge directory removed" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "[INFO] No existing challenge directory found" -ForegroundColor Gray
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Running setup script..." -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Run the setup script
|
||||
& "$PSScriptRoot/setup.ps1"
|
||||
Reference in New Issue
Block a user