Skip to content

Commit

Permalink
uninstall instead of unpublish
Browse files Browse the repository at this point in the history
  • Loading branch information
aholstrup1 committed Feb 5, 2025
1 parent b3914b3 commit 0271ecd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build/scripts/NewBcContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ New-BcContainer @parameters

$installedApps = Get-BcContainerAppInfo -containerName $containerName -tenantSpecificProperties -sort DependenciesLast
$installedApps | ForEach-Object {
if ($_.Name -notin $keepApps) {
if (-not $keepApps) {
Write-Host "Removing $($_.Name)"
Unpublish-BcContainerApp -containerName $parameters.ContainerName -name $_.Name -unInstall -doNotSaveData -doNotSaveSchema -force
} else {
Write-Host "Keeping $($_.Name)"
}
}

# Set the app version and move to dev scope
Import-Module "$PSScriptRoot\DevEnv\NewDevContainer.psm1"
Setup-ContainerForDevelopment -ContainerName $parameters.ContainerName -RepoVersion "26.0"

Invoke-ScriptInBcContainer -containerName $parameters.ContainerName -scriptblock { $progressPreference = 'SilentlyContinue' }

0 comments on commit 0271ecd

Please sign in to comment.