Skip to content

Instantly share code, notes, and snippets.

@krishnaanaril
Created June 3, 2020 05:30
Show Gist options
  • Save krishnaanaril/9ca38003aaad8e65e6ef01734337138c to your computer and use it in GitHub Desktop.
Save krishnaanaril/9ca38003aaad8e65e6ef01734337138c to your computer and use it in GitHub Desktop.
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