2
0
tcse-deploy/Login/Update-Scripts.ps1

20 lines
444 B
PowerShell

# Change the current directory to the Scripts directory
cd "C:\Scripts"
# Add exception handling for the git pull command
git config --global --add safe.directory C:/Scripts
# Clean and restore repository state
git clean -fd
git restore .
# Execute the git pull command
git pull
# Check and report the result
if ($LASTEXITCODE -eq 0) {
Write-Host "Repository successfully updated."
} else {
Write-Host "Repository update failed."
}