Skip to content

Commit 7b29e4c

Browse files
authored
next major second fix (#3363)
Co-authored-by: freddydk <[email protected]>
1 parent 9941b36 commit 7b29e4c

5 files changed

+10
-9
lines changed

AppHandling/Compile-AppInNavContainer.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ try {
436436
Write-Host "Processing dependency $($dependency.Publisher)_$($dependency.Name)_$($dependency.Version) ($($dependency.AppId))"
437437
$existingApp = $existingApps | Where-Object {
438438
if ($platformversion -ge [System.Version]"19.0.0.0") {
439-
((($dependency.appId -ne '' -and $_.AppId -eq $dependency.appId) -or ($dependency.appId -eq '' -and $_.Name -eq $dependency.Name)) -and ([System.Version]$_.Version -ge [System.Version]$dependency.version))
439+
((($dependency.appId -ne '' -and $_.AppId.value.ToString() -eq $dependency.appId) -or ($dependency.appId -eq '' -and $_.Name -eq $dependency.Name)) -and ([System.Version]$_.Version -ge [System.Version]$dependency.version))
440440
}
441441
else {
442442
(($_.Name -eq $dependency.name) -and ($_.Name -eq "Application" -or (($_.Publisher -eq $dependency.publisher) -and ([System.Version]$_.Version -ge [System.Version]$dependency.version))))
@@ -606,7 +606,7 @@ try {
606606
$dependency = $_
607607
$dependencyAppId = "$(if ($dependency.PSObject.Properties.name -eq 'AppId') { $dependency.AppId } else { $dependency.Id })"
608608
Write-Host "Dependency: Id=$dependencyAppId, Publisher=$($dependency.Publisher), Name=$($dependency.Name), Version=$($dependency.Version)"
609-
$existingApps | Where-Object { $_.AppId -eq [System.Guid]$dependencyAppId -and $_.Version -gt [System.Version]$dependency.Version } | ForEach-Object {
609+
$existingApps | Where-Object { "$($_.AppId)" -eq $dependencyAppId -and $_.Version -gt [System.Version]$dependency.Version } | ForEach-Object {
610610
$dependency.Version = "$($_.Version)"
611611
Write-Host "- Set dependency version to $($_.Version)"
612612
$changes = $true

AppHandling/Get-NavContainerAppInfo.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ try {
108108
}
109109
else {
110110
$inArgs += @{ "ServerInstance" = $ServerInstance }
111-
$apps = Get-NAVAppInfo @inArgs | Where-Object { (!$installedOnly) -or ($_.IsInstalled -eq $true) } | ForEach-Object { Get-NAVAppInfo -id "$($_.AppId)" -publisher $_.publisher -name $_.name -version $_.Version @inArgs }
111+
$apps = Get-NAVAppInfo @inArgs | Where-Object { (!$installedOnly) -or ($_.IsInstalled -eq $true) } | ForEach-Object { Get-NAVAppInfo -id $_.AppId.value -publisher $_.publisher -name $_.name -version $_.Version @inArgs }
112112
}
113113

114114
if ($sort -ne "None") {

AppHandling/Publish-NavContainerApp.ps1

+3-2
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ try {
130130
if ($checkAlreadyInstalled) {
131131
# Get Installed apps (if UseDevEndpoint is specified, only get global apps)
132132
$installedApps = Get-BcContainerAppInfo -containerName $containerName -installedOnly | Where-Object { (-not $useDevEndpoint.IsPresent) -or ($_.Scope -eq 'Global') } | ForEach-Object {
133-
@{ "id" = $_.appId; "publisher" = $_.publisher; "name" = $_.name; "version" = $_.Version }
133+
@{ "id" = $_.appId.value.ToString(); "publisher" = $_.publisher; "name" = $_.name; "version" = $_.Version }
134134
}
135135
}
136136
}
@@ -143,7 +143,8 @@ try {
143143
# Get Installed apps (if UseDevEndpoint is specified, only get global apps)
144144
$installedApps = Invoke-ScriptInCloudBcContainer -authContext $bcAuthContext -containerId $environment -scriptblock {
145145
Get-NAVAppInfo -ServerInstance $serverInstance -TenantSpecificProperties -tenant 'default' | Where-Object { $_.IsInstalled -eq $true -and ((-not $useDevEndpoint.IsPresent) -or ($_.Scope -eq 'Global')) } | ForEach-Object {
146-
Get-NAVAppInfo -ServerInstance $serverInstance -TenantSpecificProperties -tenant 'default' -id $_.AppId -publisher $_.publisher -name $_.name -version $_.Version }
146+
Get-NAVAppInfo -ServerInstance $serverInstance -TenantSpecificProperties -tenant 'default' -id $_.AppId.value -publisher $_.publisher -name $_.name -version $_.Version } | ForEach-Object {
147+
@{ "id" = $_.appId.value.ToString(); "publisher" = $_.publisher; "name" = $_.name; "version" = $_.Version }
147148
}
148149
}
149150
else {

AppHandling/Run-AlPipeline.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -1829,7 +1829,7 @@ Write-Host -ForegroundColor Yellow @'
18291829
param($appFile)
18301830
Get-NavAppInfo -Path $appFile
18311831
} -argumentList (Get-BcContainerPath -containerName $containerName -path $appFile)
1832-
$appId = $appInfo.AppId
1832+
$appId = $appInfo.AppId.ToString()
18331833
}
18341834
else {
18351835
$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) ([Guid]::NewGuid().ToString())

NuGet/Publish-BcNuGetPackageToContainer.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ Function Publish-BcNuGetPackageToContainer {
6969
$isCloudBcContainer = isCloudBcContainer -authContext $bcAuthContext -containerId $environment
7070
if ($isCloudBcContainer) {
7171
$installedApps = @(Invoke-ScriptInCloudBcContainer -authContext $bcAuthContext -containerId $environment -scriptblock {
72-
Get-NAVAppInfo -ServerInstance $serverInstance -TenantSpecificProperties -tenant 'default' | Where-Object { $_.IsInstalled -eq $true } | ForEach-Object { Get-NAVAppInfo -ServerInstance $serverInstance -TenantSpecificProperties -tenant 'default' -id $_.AppId -publisher $_.publisher -name $_.name -version $_.Version }
73-
} | ForEach-Object { @{ "Publisher" = $_.Publisher; "Name" = $_.Name; "Id" = $_.AppId; "Version" = $_.Version } } )
72+
Get-NAVAppInfo -ServerInstance $serverInstance -TenantSpecificProperties -tenant 'default' | Where-Object { $_.IsInstalled -eq $true } | ForEach-Object { Get-NAVAppInfo -ServerInstance $serverInstance -TenantSpecificProperties -tenant 'default' -id $_.AppId.value -publisher $_.publisher -name $_.name -version $_.Version }
73+
} | ForEach-Object { @{ "Publisher" = $_.Publisher; "Name" = $_.Name; "Id" = $_.AppId.value.ToString(); "Version" = $_.Version } } )
7474
# Get Country and Platform from the container
7575
}
7676
else {
@@ -81,7 +81,7 @@ Function Publish-BcNuGetPackageToContainer {
8181
}
8282
}
8383
else {
84-
$installedApps = @(Get-BcContainerAppInfo -containerName $containerName -installedOnly | ForEach-Object { @{ "Publisher" = $_.Publisher; "Name" = $_.Name; "Id" = $_.AppId; "Version" = $_.Version } } )
84+
$installedApps = @(Get-BcContainerAppInfo -containerName $containerName -installedOnly | ForEach-Object { @{ "Publisher" = $_.Publisher; "Name" = $_.Name; "Id" = $_.AppId.value.ToString(); "Version" = $_.Version } } )
8585
$installedPlatform = [System.Version](Get-BcContainerPlatformVersion -containerOrImageName $containerName)
8686
$installedCountry = (Get-BcContainerCountry -containerOrImageName $containerName).ToLowerInvariant()
8787
}

0 commit comments

Comments
 (0)