-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
refactorImprovement on the code not on the functionalityImprovement on the code not on the functionality
Milestone
Description
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
}Metadata
Metadata
Assignees
Labels
refactorImprovement on the code not on the functionalityImprovement on the code not on the functionality