Refactor deploy testing as it's too complicated and messy.
Refactor this function to avoid changing location. Use -C parameter or git
function Reset-Manifest{
[CmdletBinding(SupportsShouldProcess)]
param()
Push-Location . -StackName ResetManifest
$manifestPath | Split-Path -Parent | Set-Location
# Check git status and see if manifest is dirty
$status = git status --porcelain $manifestPath
if ($status) {
# Manifest is dirty, restore it
if ($PSCmdlet.ShouldProcess($manifestPath, "git restore")) {
git restore $manifestPath
}
}
Pop-Location -StackName ResetManifest
}
Refactor deploy testing as it's too complicated and messy.
Refactor this function to avoid changing location. Use -C parameter or git