Created
June 3, 2020 05:30
-
-
Save krishnaanaril/9ca38003aaad8e65e6ef01734337138c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$goodCommit = $( Read-Host "Good commit hash, please" ), | |
[Parameter(Mandatory=$true)] | |
[string]$badCommit = $( Read-Host "Bad commit hash, please" ), | |
[Parameter(Mandatory=$true)] | |
[string]$testProjectPath = $( Read-Host "Test project path, please" ) | |
) | |
Write-Host $goodCommit $badCommit $testProjectPath | |
try | |
{ | |
git bisect start $badCommit $goodCommit | |
git bisect run dotnet test $testProjectPath -v q | |
git bisect reset | |
} | |
catch { | |
write-host "Caught an exception:" -ForegroundColor Red | |
write-host "Exception Type: $($_.Exception.GetType().FullName)" -ForegroundColor Red | |
write-host "Exception Message: $($_.Exception.Message)" -ForegroundColor Red | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment