AL/Get-VersionAppJson.ps1
function Get-VersionAppJson { Param ( [Parameter(Mandatory=$false)] [string]$SourcePath = (Get-Location), [Parameter(Mandatory=$false)] [string] $ArtifactUrl = "" ) $platform = Get-AppKeyValue -KeyName 'platform' -SourcePath $SourcePath if ($platform -eq "") { if ($ArtifactUrl -eq "") { $platform = "0.0.0.0" } else { try { $platform = [version]($ArtifactUrl.Split('/')[-2]) } catch { $platform = "0.0.0.0" } } } [version]$platform } |