diff --git a/docker/Edit-DockerCompose.ps1 b/docker/Edit-DockerCompose.ps1 index 4670800..2d0c2a5 100644 --- a/docker/Edit-DockerCompose.ps1 +++ b/docker/Edit-DockerCompose.ps1 @@ -24,17 +24,22 @@ foreach( $local:ext in @('.yml', '.yaml') ) { $local:testPath = Join-Path $path $fileName if( $Force -or $(Test-Path $testPath) ) { $editFiles += $testPath - $editFiles += Get-ChildItem $(Join-Path $path '*') -Include $EditBonus -Depth 1 + $editFiles += Get-ChildItem $(Join-Path $path '*') -Include $EditBonus -Depth 1 | + Select-Object -ExpandProperty FullName } } } - if( -not $editFiles ) { continue } - - - break + if( $editFiles ) { + break + } } - -Edit-TextFile ($($editFiles | Sort-Object) + $AdditionalFiles) +$local:FinalEditList = $editFiles | Where-Object {$_} | Sort-Object { + $local:n = [System.IO.Path]::GetFileName($_) + Join-Path [PSystem.IO.ath]::GetDirectoryName($_) "$(if( $n[0] -eq '.' ) { "9" } else { "1" })$n" + } +$FinalEditList = @() + $FinalEditList + @() + $AdditionalFiles + +Edit-TextFile $FinalEditList $editFiles | Select-Object -First 1 | ForEach-Object { docker-compose --file $(Resolve-Path $_) config -q }