Public/Get-ApplicationVersionFromArtifacts.ps1
function Get-ApplicationVersionFromArtifacts { param ( [String] $Version = '', [String] $Country = 'w1', [ValidateSet('Latest', 'First', 'All', 'Closest', 'SecondToLastMajor', 'Current', 'NextMinor', 'NextMajor')] [String] $select = 'Latest' ) $type = 'OnPrem' $alwaysPull = $false $artifactUrl = Get-BCArtifactUrl -version $Version -country $Country -select $select -type $type $artifactPaths = Download-Artifacts -artifactUrl $artifactUrl -includePlatform -forceRedirection:$alwaysPull $appArtifactPath = $artifactPaths[0] $appManifestPath = Join-Path $appArtifactPath "manifest.json" $appManifest = Get-Content $appManifestPath | ConvertFrom-Json Write-Output $appManifest.version } Export-ModuleMember -Function Get-ApplicationVersionFromArtifacts |