Skip to content

devops-less/powershell-devops-functions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DevOps.Helper.Functions

A set of functions to help with DevOps tasks like building applications and running tools.

Table of Contents

Installation

To install the module, run the following command in PowerShell:

Import-Module -Name DevOps.Helper.Functions

Usage

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"
}

Functions

Public Functions

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

Private Functions

Assert-Condition test condition
Write-Group write a terminal group (GitHub, GitLab)

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •