Skip to content

Commit

Permalink
Problem in Next Major (#3331)
Browse files Browse the repository at this point in the history
Include Microsoft_Business Foundation Test Libraries.app when importing
test libraries (and tests)
Include Microsoft_System Application Test.app and Microsoft_Business
Foundation Tests.app when importing tests
Bug when running Publish-BcContainerApp against a cloud container
($authContext not defined)
Remove the need for a Container when using Replace-DependenciesInAppFile
(containername parameter is now obsolete)

---------

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
  • Loading branch information
freddydk and freddydk committed Feb 8, 2024
1 parent 775d2b1 commit d54defb
Show file tree
Hide file tree
Showing 4 changed files with 166 additions and 161 deletions.
11 changes: 7 additions & 4 deletions AppHandling/Publish-NavContainerApp.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,10 @@ try {
else {
# Get Installed apps (if UseDevEndpoint is specified, only get global apps or PTEs)
# PublishedAs is either "Global", " PTE" or " Dev" (with leading space)
$installedApps = Get-BcInstalledExtensions -bcAuthContext $bcAuthContext -environment $environment | Where-Object { $_.IsInstalled -and ((-not $useDevEndpoint.IsPresent) -or ($_.PublishedAs -ne ' Dev')) } | ForEach-Object {
$installedApps = Get-BcInstalledExtensions -bcAuthContext $bcAuthContext -environment $environment
Write-Host "InstalledApps:"
$installedApps | ForEach-Object { Write-Host "- $($_.id) $($_.displayName) $($_.VersionMajor).$($_.VersionMinor).$($_.VersionBuild).$($_.VersionRevision) '$($_.PublishedAs)' $($_.IsInstalled) $($_.publisher)" }
$installedApps = $installedApps | Where-Object { $_.IsInstalled -and ((-not $useDevEndpoint.IsPresent) -or ($_.PublishedAs -ne ' Dev')) } | ForEach-Object {
@{ "id" = $_.id; "publisher" = $_.publisher; "name" = $_.displayName; "version" = [System.Version]::new($_.VersionMajor,$_.VersionMinor,$_.VersionBuild,$_.VersionRevision) }
}
}
Expand All @@ -163,7 +166,7 @@ try {

if ($ShowMyCode -ne "Ignore" -or $replaceDependencies -or $replacePackageId -or $internalsVisibleTo) {
Write-Host "Checking dependencies in $appFile"
Replace-DependenciesInAppFile -containerName $containerName -Path $appFile -replaceDependencies $replaceDependencies -internalsVisibleTo $internalsVisibleTo -ShowMyCode $ShowMyCode -replacePackageId:$replacePackageId
Replace-DependenciesInAppFile -Path $appFile -replaceDependencies $replaceDependencies -internalsVisibleTo $internalsVisibleTo -ShowMyCode $ShowMyCode -replacePackageId:$replacePackageId
}

if ($copyInstalledAppsToFolder) {
Expand Down Expand Up @@ -392,9 +395,9 @@ try {
}
if ($isCloudBcContainer) {
$containerPath = Join-Path 'C:\DL' ([System.IO.Path]::GetFileName($appfile))
Copy-FileToCloudBcContainer -authContext $authContext -containerId $environment -localPath $appFile -containerPath $containerPath
Copy-FileToCloudBcContainer -authContext $bcAuthContext -containerId $environment -localPath $appFile -containerPath $containerPath
Invoke-ScriptInCloudBcContainer `
-authContext $authContext `
-authContext $bcAuthContext `
-containerId $environment `
-ScriptBlock $scriptblock `
-ArgumentList $containerPath, $skipVerification, $sync, $install, $upgrade, $tenant, $syncMode, $packageType, $scope, $language, $PublisherAzureActiveDirectoryTenantId, $force, $ignoreIfAppExists
Expand Down

0 comments on commit d54defb

Please sign in to comment.