Containers/Get-ImageNameForRepo.ps1
function Get-ImageNameForRepo { Param( [Parameter(Mandatory=$false)] [string] $Version, [Parameter(Mandatory=$false)] [string] $SourcePath = (Get-Location) ) if ($null -eq $Version -or $Version -eq "") { $Version = Get-EnvironmentKeyValue -SourcePath $SourcePath -KeyName 'version' } } function Set-ImageNameForRepo { [CmdletBinding(SupportsShouldProcess, ConfirmImpact="low")] Param( [Parameter(Mandatory=$false)] [string]$SourcePath = (Get-Location), [Parameter(Mandatory=$true)] [string]$ImageName ) if ($PSCmdlet.ShouldProcess("image", "Value will be updated for ")) { Set-EnvironmentKeyValue -SourcePath $SourcePath -KeyName 'image' -KeyValue $ImageName } } |