A set of functions to help with DevOps tasks like building applications and running tools.
To install the module, run the following command in PowerShell:
Import-Module -Name DevOps.Helper.Functions
To use the functions provided by this module, simply call them in your PowerShell scripts. For example:
Trace-Expression -Name "test" {
Invoke-Shell "ping 192.169.0.1" -Name "ping"
}
Add-TrailingSlash | Add paths trailing / or \ (os deps) |
Assert-Path | check path exists |
Assert-Tool | check command/tool exists |
Enable-Debug | Enable debug log message |
Find-FirstFileByPattern | Finds a single file by pattern |
Get-CommandWithArgs | Build a command by args list |
Get-GitFiles | git ls-files as array |
Invoke-Shell | run a shell command |
Select-JsonFromPath | Select a value in a JSON object by a path. ex: 'key1.key2' |
Start-ProcessWithOutput | Start a system process. |
Trace-Expression | Trace a block execution |
Write-Log | write log messages |
Assert-Condition | test condition |
Write-Group | write a terminal group (GitHub, GitLab) |
This project is licensed under the MIT License. See the LICENSE file for more details.