
dps is now an Alias to Get-DockerProcess Get-DockerProcess has been cleaned up and search features added to it. Added FromPowerShellCookbook, which loads a piece of code from the module, but does not load the entire module. MyConfig now includes ansible and tmux configs, also added -sudo switch Get-PlexInfo added, with ability to read directly from Server Invoke-ViaAnsible modified - cleaned up output Added -Force to Edit-DockerCompose dcc modified to read from raw log (which allows filtering by source, and has timestamps)
14 lines
554 B
PowerShell
14 lines
554 B
PowerShell
[CmdletBinding(SupportsShouldProcess)]param([string[]]$ProjectPath=@($PWD),[switch]$Force)
|
|
|
|
$local:editCandidates = @('docker-compose.yml','.base.docker-compose.yml')
|
|
$local:editFiles = @()
|
|
foreach( $local:fileName in $EditCandidates ) {
|
|
foreach( $local:path in $ProjectPath ) {
|
|
$local:testPath = Join-Path $path $fileName
|
|
if( $Force -or $(Test-Path $testPath) ) { $editFiles += $testPath }
|
|
}
|
|
}
|
|
|
|
Edit-TextFile $editFiles
|
|
|
|
$editFiles | Select-Object -First 1 | ForEach-Object { docker-compose --file $(Resolve-Path $_) config -q }
|