This commit is contained in:
Freddy Kristiansen 2019-11-05 09:40:08 +01:00
Родитель 964cac1d39
Коммит 6b552e87d3
2 изменённых файлов: 80 добавлений и 230 удалений

Просмотреть файл

@ -3,7 +3,7 @@
#
# Generated by: Freddy Kristiansen
#
# Generated on: 14-06-2019
# Generated on: 11/5/2019
#
@{
@ -12,7 +12,7 @@
RootModule = 'NavContainerHelper.psm1'
# Version number of this module.
ModuleVersion = '0.6.1.4'
ModuleVersion = '0.6.4.17'
# Supported PSEditions
# CompatiblePSEditions = @()
@ -69,45 +69,47 @@ Description = 'PowerShell module'
# NestedModules = @()
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
FunctionsToExport = 'Add-FontsToNavContainer', 'Backup-NavContainerDatabases', 'Restore-DatabasesInNavContainer',
'Check-NavContainerHelperPermissions', 'Compile-AppInNavContainer',
'Compile-ObjectsInNavContainer', 'Convert-AlcOutputToAzureDevOps',
'Convert-ModifiedObjectsToAl', 'Convert-Txt2Al',
'Copy-CompanyInNavContainer', 'Copy-FileFromNavContainer',
'Copy-FileToNavContainer', 'Create-AlProjectFolderFromNavContainer',
'Create-MyDeltaFolder', 'Create-MyOriginalFolder',
FunctionsToExport = 'Add-FontsToNavContainer', 'Add-GitToAlProjectFolder',
'Backup-NavContainerDatabases',
'Check-NavContainerHelperPermissions', 'Clean-BcContainerDatabase',
'Compile-AppInNavContainer', 'Compile-ObjectsInNavContainer',
'Convert-AlcOutputToAzureDevOps', 'Convert-ModifiedObjectsToAl',
'Convert-Txt2Al', 'Copy-AlSourceFiles', 'Copy-CompanyInNavContainer',
'Copy-FileFromNavContainer', 'Copy-FileToNavContainer',
'Create-AadAppsForNav', 'Create-AadUsersInNavContainer',
'Download-File', 'Enter-NavContainer',
'Create-AlProjectFolderFromNavContainer', 'Create-MyDeltaFolder',
'Create-MyOriginalFolder', 'Download-File', 'Enter-NavContainer',
'Export-ModifiedObjectsAsDeltas',
'Export-NavContainerDatabasesAsBacpac',
'Export-NavContainerObjects', 'Extract-AppFileToFolder', 'Replace-DependenciesInAppFile',
'Export-NavContainerObjects', 'Extract-AppFileToFolder',
'Extract-FilesFromNavContainerImage',
'Extract-FilesFromStoppedNavContainer',
'Generate-SymbolsInNavContainer', 'Get-BestNavContainerImageName',
'Get-CompanyInNavContainer', 'Get-LocaleFromCountry',
'Get-NavContainerApiCompanyId', 'Get-NavContainerApp',
'Get-NavContainerAppInfo', 'Get-NavContainerAppRuntimePackage',
'Get-NavContainerCountry', 'Get-NavContainerDebugInfo',
'Get-NavContainerEula', 'Get-NavContainerEventLog',
'Get-NavContainerGenericTag', 'Get-NavContainerId',
'Get-NavContainerImageLabels', 'Get-NavContainerImageName',
'Get-NavContainerImageTags', 'Get-NavContainerIpAddress',
'Get-NavContainerLegal', 'Get-NavContainerName',
'Get-NavContainerNavUser', 'Get-NavContainerNavVersion',
'Get-NavContainerOsVersion', 'Get-NavContainerPath',
'Get-NavContainerPlatformVersion', 'Get-NavContainers',
'Get-NavContainerServerConfiguration', 'Get-NavContainerSession',
'Get-NavContainerSharedFolders', 'Get-NavContainerTenants',
'Get-NavVersionFromVersionInfo', 'Get-TestsFromNavContainer',
'Import-ConfigPackageInNavContainer', 'Import-DeltasToNavContainer',
'Import-NavContainerLicense', 'Import-ObjectsToNavContainer',
'Flush-ContainerHelperCache', 'Generate-SymbolsInNavContainer',
'Get-BestNavContainerImageName', 'Get-CompanyInNavContainer',
'Get-LocaleFromCountry', 'Get-NavContainerApiCompanyId',
'Get-NavContainerApp', 'Get-NavContainerAppInfo',
'Get-NavContainerAppRuntimePackage', 'Get-NavContainerCountry',
'Get-NavContainerDebugInfo', 'Get-NavContainerEula',
'Get-NavContainerEventLog', 'Get-NavContainerGenericTag',
'Get-NavContainerId', 'Get-NavContainerImageLabels',
'Get-NavContainerImageName', 'Get-NavContainerImageTags',
'Get-NavContainerIpAddress', 'Get-NavContainerLegal',
'Get-NavContainerName', 'Get-NavContainerNavUser',
'Get-NavContainerNavVersion', 'Get-NavContainerOsVersion',
'Get-NavContainerPath', 'Get-NavContainerPlatformVersion',
'Get-NavContainers', 'Get-NavContainerServerConfiguration',
'Get-NavContainerSession', 'Get-NavContainerSharedFolders',
'Get-NavContainerTenants', 'Get-NavVersionFromVersionInfo',
'Get-TestsFromNavContainer', 'Import-ConfigPackageInNavContainer',
'Import-DeltasToNavContainer', 'Import-NavContainerLicense',
'Import-ObjectsToNavContainer',
'Import-PfxCertificateToNavContainer',
'Import-TestToolkitToNavContainer', 'Install-NavContainerApp',
'Install-NAVSipCryptoProviderFromNavContainer',
'Invoke-NavContainerApi', 'Invoke-NavContainerCodeunit',
'Invoke-ScriptInNavContainer', 'New-CompanyInNavContainer',
'New-DesktopShortcut', 'New-LetsEncryptCertificate',
'New-NavContainer', 'Flush-ContainerHelperCache', 'New-NavContainerNavUser',
'New-NavContainer', 'New-NavContainerNavUser',
'New-NavContainerTenant', 'New-NavContainerWindowsUser',
'Open-NavContainer', 'Publish-NavContainerApp',
'Publish-NewApplicationToNavContainer',
@ -115,14 +117,16 @@ FunctionsToExport = 'Add-FontsToNavContainer', 'Backup-NavContainerDatabases', '
'Remove-ConfigPackageInNavContainer', 'Remove-DesktopShortcut',
'Remove-NavContainer', 'Remove-NavContainerSession',
'Remove-NavContainerTenant', 'Renew-LetsEncryptCertificate',
'Repair-NavContainerApp', 'Replace-NavServerContainer',
'Restart-NavContainer', 'Run-TestsInNavContainer',
'Repair-NavContainerApp', 'Replace-DependenciesInAppFile',
'Replace-NavServerContainer', 'Restart-NavContainer',
'Restore-DatabasesInNavContainer', 'Run-TestsInNavContainer',
'Setup-NavContainerTestUsers',
'Setup-TraefikContainerForNavContainers', 'Sign-NavContainerApp',
'Start-NavContainer', 'Start-NavContainerAppDataUpgrade',
'Stop-NavContainer', 'Sync-NavContainerApp', 'Test-NavContainer',
'Sort-AppFoldersByDependencies', 'Start-NavContainer',
'Start-NavContainerAppDataUpgrade', 'Stop-NavContainer',
'Sync-NavContainerApp', 'Test-NavContainer',
'UnInstall-NavContainerApp', 'UnPublish-NavContainerApp',
'Wait-NavContainerReady', 'Write-NavContainerHelperWelcomeText', 'Sort-AppFoldersByDependencies'
'Wait-NavContainerReady', 'Write-NavContainerHelperWelcomeText'
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = @()
@ -131,11 +135,12 @@ CmdletsToExport = @()
# VariablesToExport = @()
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = 'Add-FontsToBCContainer', 'Backup-BCContainerDatabases', 'Restore-DatabasesInBCContainer',
AliasesToExport = 'Add-FontsToBCContainer', 'Backup-BCContainerDatabases',
'Compile-AppInBCContainer', 'Copy-CompanyInBCContainer',
'Copy-FileFromBCContainer', 'Copy-FileToBCContainer',
'Create-AadAppsForBC', 'Create-AadUsersInBCContainer',
'Enter-BCContainer', 'Export-BCContainerDatabasesAsBacpac',
'Create-AlProjectFolderFromBcContainer', 'Enter-BCContainer',
'Export-BCContainerDatabasesAsBacpac',
'Extract-FilesFromBCContainerImage',
'Extract-FilesFromStoppedBCContainer',
'Get-BCContainerApiCompanyId', 'Get-BCContainerApp',
@ -160,13 +165,13 @@ AliasesToExport = 'Add-FontsToBCContainer', 'Backup-BCContainerDatabases', 'Rest
'Invoke-BCContainerApi', 'Invoke-ScriptInBCContainer',
'New-BCContainer', 'New-BCContainerBCUser', 'New-BCContainerTenant',
'New-BCContainerWindowsUser', 'New-CompanyInBCContainer',
'Open-BCContainer', 'Publish-BCContainerApp',
'Open-BCContainer', 'Publish-BCContainerApp',
'Publish-NewApplicationToBcContainer', 'Remove-BCContainer',
'Remove-BCContainerSession', 'Remove-BCContainerTenant',
'Remove-CompanyInBCContainer', 'Remove-ConfigPackageInBCContainer',
'Repair-BCContainerApp', 'Replace-BCServerContainer',
'Restart-BCContainer', 'Run-TestsInBCContainer',
'Setup-BCContainerTestUsers',
'Restart-BCContainer', 'Restore-DatabasesInBCContainer',
'Run-TestsInBCContainer', 'Setup-BCContainerTestUsers',
'Setup-TraefikContainerForBCContainers', 'Sign-BCContainerApp',
'Start-BCContainer', 'Start-BCContainerAppDataUpgrade',
'Stop-BCContainer', 'Sync-BCContainerApp', 'Test-BCContainer',
@ -200,173 +205,20 @@ PrivateData = @{
# IconUri = ''
# ReleaseNotes of this module
ReleaseNotes = '0.6.1.4
Add parameters EnableAppSourceCop, EnablePerTenantExtensionCop and EnableUICop to Compile-AppInNavContainer
Shortcuts on the Desktop will only have RunAsAdmin if you are running NavContainerHelper as admin
BugFix #494
0.6.1.3
Added parameter appName to Compile-AppInNavContainer to allow you to specify an app name instead of the default publisher_appname_version.app
Added some debugging output to Compile-ObjectsInNavContainer
Changing the default tenant to use the default tenant (not the tenant template) to export as bacpac in Export-NavContainerDatabasesAsBacpac
Check that the tenant exported in Export-NavContainerDatabasesAsBacpac is operational before exporting
Fix bug #492 - Publish-NavContainerApp deletes the App file
0.6.1.2
Remove .git folder and other files, which should not be published
Added function Get-NavContainerApp to download an app or symbols from a container
Added function Extract-AppFileToFolder to extract the content of an App Package to a Folder
Prepare NavContainerHelper for BC containers (without C/AL and without Windows Client)
Support for 1903 generic image (mcr.microsoft.com/dynamicsnav:generic-1903) with -useBestContainerOS
Improve Traefik Security by disallowing port 8080 on host (Thanks Damien Duportal)
Add ForceSync sync mode and Language parameter to Publish-NavContainerApp (Thanks Martin Kuhn)
Additional rebranding for NAV/BC containers
0.6.1.1
Reverted the change to default to hyperv isolation if the revision number is different. Instead, just write a warning to maybe specify -isolation hyperv.
0.6.1.0
Added support for traefik (Thanks Tobias Fenster)
Added BCContainer aliases for all functions with NavContainer in the name (which are not C/AL functions)
Functions working on C/AL objects will not work with version 15.0 and higher
Remove functions Convert-CALExecutionTimeToTimeSpan and Convert-CALTestOutputToAzureDevOps
Fix: UnInstall and UnPublishNavContainerApp didn''t transfer the value of doNotSaveData to the underlying cmdlet
Added parameter Force to UnInstall and UnPublishNavContainerApp
Fix: Backup-NavContainerDatabases added another mediaset if the file already exists, making the backup useless for creating containers.
Added parameter BakFile to New-NavContainer to specify bakFile when starting container
Added parameter UseGenericImage to New-NavContainer to allow for using private generic docker images for re-platforming and running container.
New-NavContainer defaults to hyperv isolation if the Host OS version differs from the Container OS version (incl. release number = new)
0.6.0.15
Move the git piece of Create-AlProjectFromNavContainer to the end. If this fails, then everything is still created correctly.
Create txt files for platform, version and country when extracting files from a container and use those (if existing) when spinning up a generic image.
0.6.0.14
Support for Windows 10 1903 preview
0.6.0.13
Bugfix: Publish-NewApplicationToNavContainer was hardcoded to use CRONUS as database - must take databasename from customsettings
0.6.0.12
Fix: Event Sources is missing for WebClient in Nav 2018 and Business Central Containers (prior to generic tag 0.0.9.6), causing the WebClient to crash if an entry is added to the event log.
0.6.0.11
Regression: Compile-AppInNavContainer should not add defaulting for AssemblyProbingPaths for versions prior to 13.x
0.6.0.10
Test-NavContainer and Get-NavContainerId should now be case insensitive
Get-NavContainers now use a single docker statement instead of multiple calls
Include WindowsPowerShellScripts\WebSearch\TransitionMenuSuiteObjectsForSearch.psm1 if it exists when extracting files from container
BugFix: Run-TestsInNavContainer didn''t use the users company setting when running Windows Authentication
Added parameter CompanyName to Run-TestsInNavContainer
Ignore License expiration warning lines when running Get-CompanyInNavContainer when the user is not running when admin priveleges
Ignore License expiration warning lines when running Get-NavContainerNavUser when the user is not running when admin priveleges
0.6.0.9
Regression: Export-NavContainerObjects didn''t respect filter containing id in 14.x
0.6.0.8
Use DacFramework 18.2
BugFix: Create-AlProjectFromNavContainer used a global imageName, should be containerName
0.6.0.7
BugFix: Regression - 14.x images has hidden dependency to app symbols
Add parameter for file pattern to Convert-ModifiedObjectsToAl in order to allow for app movement
0.6.0.6
Bugfix #423 Regression in Convert-Txt2Al $imageName is unknown
0.6.0.5
Bugfix #421 Export-NavContainerDatabasesAsBacpac error deleting [user login] data
0.6.0.4
Added parameter enableSymbolLoading to Replace-NavServerContainer
0.6.0.3
Regression in Export-NavContainerObjects fixed - $imagename unknown
New function Extract-FilesFromStoppedNavContainer to extract (copy) files from a stopped container
0.6.0.1
Regression in Compile-AppInNavContainer when running container prior to 14.x
0.6.0.0
BugFix #403: Extract-FilesFromNavContainer didn''t work with all local containers
Include ClientContext.ps1, PsTestFunctions.ps1 and pstesttoolpage.fob in NavContainerHelper instead of downloading on demand
Add enableSymbolLoading option to Replace-NavServerContainer
Compile-AppInNavContainer should only include dependencies in app.json
Drop View deadlock_report_ring_buffer_view when creating bacpac using Export-NavContainerDatabasesAsBacpac
UpdateHosts will update hosts file in the container with all entries ending with .docker.internal from the host
Enable paging in Get-NavContainerImageTags
Add parameter networkName to Get-NavContainerIpAddress or get IP address from first network with IP Address
Add IncludeSystemObjects parameter to Export-NavContainerObjects
Add parameters doNotUseDeltas and alProjectFolder to Convert-ModifiedObjectsToAl
Add parameter -includeAL to New-NavContainer to create AL source folder and .netpackages folder with reference assemblies for VS Code
Add parameters nowarn and assemblyProbingPaths to Compile-AppInNavContainer. Default assemblyProbingPaths is .netpackages in the project folder and all dll locations in the container
Add parameter dotNetAddInsPackage to Convert-ModifiedObjectsToAl and Convert-Txt2Al
New function Publish-NewApplicationToNavContainer to publish an app including base app to a container
New function Create-AlProjectFolderFromNavContainer to create a VS Code AL Project Folder based on a Container
Bugfix #413: Copy-CompanyInNavContainer throws strange exception
0.5.0.11
BugFix: Regression in Compile-AppInNavContainer when using NavUserPassword
0.5.0.10
BugFix #391 [Devops Pipeline].[Compile-App] publisher property not found
Added parameter rulesetFile to Compile-AppInNavContainer
BugFix #382 Compile-AppInNavContainer cannot download symbols on containers without updated hosts
Breaking change: Setup-NavContainerTestUsers has a changed parameter set (specify admin crendential instead of sql credential)
Added function: Get-NavContainerApiCompanyId to get the CompanyId for Api Calls
Added function: Invoke-NavContainerApi to invoke Api calls towards a container
Changed Compile-AppInNavContainer to use the container IP address for downloading symbols
0.5.0.9
Bugfix: Regression in Convert-ModifiedObjectsToAl
0.5.0.7
BugFix #380: Remove WinClient Debugger shortcut
Publish and install an app instead of a codeunit when adding test users to Business Central
Support Groups in Run-TestsInNavContainer
Create AL baseline for database objects when version 14 (Spring Release)
Added parameter -doNotUseDeltas to Convert-ModifiedObjectsToAl to create complete AL files of the objects exported
0.5.0.5
Added parameters testCodeunit and testFunction to Run-TestsInNavContainer to run individual tests
Added function Get-TestsFromNavContainer to get a list of available tests
Added a shortcut for the WinClient Debugger when using includecside
Include ImportAction to Import-TestToolKitToNavContainer and Import-ObjectsToNavContainer
Check that NavContainerHelper is running in 64bit mode
Remove Symbols for Application and Test when running containers in hybrid development
Use application version number from dbproperty database for application symbols (if possible)
0.5.0.4
BugFix: Transfer AzureDevOps parameter to PsTestRunner
0.5.0.3
Add paging to Get-NavContainerImageTags (needed for Azure Container Registries)
Do not allow c:\programdata\navcontainerhelper as the folder in Export-NavContainerObjects
BugFix #355 - Add-FontsToNavContainer fails if the folders doesn''t have the same path
Added function Run-TestsInNavContainer (preview)
Update help text for Copy-FileToNavContainer and Copy-FileFromNavContiner and throw an error if the destination filename specifies a folder
0.5.0.2
Added function Copy-CompanyInNavContainer (Thanks Dmitry K.)
Bugfix: Compile-AppInNavContainer didn''t escape the publisher name
Bugfix: All User data wasn''t cleaned up when doing Export-NavContainerDatabasesAsBacpac
0.5.0.1
Fix bug where Get-BestNavContainerImageName returns an illegal image name'
# Prerelease string of this module
# Prerelease = ''
# Flag to indicate whether the module requires explicit user acceptance for install/update
# RequireLicenseAcceptance = $false
ReleaseNotes = '0.6.4.17
Issue #700 Restore-DatabasesInBcContainer will clear the TestFunctions folder to force re-import
BREAKING CHANGE: added mandatory containerName parameter to Replace-DependenciesInAppFile
Issue #692 System.IO.Packaging.Package could not be found. This is fixed by the breaking change above
Detect Windows 10 1909 on host (no generic 1909 yet)
Add retry algorithm to SetupWebClient (as setupWebClient sometimes fails with locking issues)
Issue #710 traefik fails if PublicDnsName doesn''t contain a period (.)
Issue #711 Alias Install-BCContainerApp cannot be found'
# External dependent modules of this module
# ExternalModuleDependencies = @()
# ExternalModuleDependencies = ''
} # End of PSData hashtable
} # End of PrivateData hashtable
# HelpInfo URI of this module

Просмотреть файл

@ -1,42 +1,40 @@
$VerbosePreference="SilentlyContinue"
$path = $PSScriptRoot
# Version, Author, CompanyName and nugetkey
. (Join-Path $PSScriptRoot "settings.ps1")
Clear-Host
#Invoke-ScriptAnalyzer -Path $PSScriptRoot -Recurse -Settings PSGallery -Severity Warning
Get-ChildItem -Path $PSScriptRoot -Recurse | % { Unblock-File -Path $_.FullName }
Remove-Module NavContainerHelper -ErrorAction Ignore
Uninstall-module NavContainerHelper -ErrorAction Ignore
$path = "c:\temp\NavContainerHelper"
if (Test-Path -Path $path) {
Remove-Item -Path $path -Force -Recurse
}
Copy-Item -Path $PSScriptRoot -Destination "c:\temp" -Exclude @("settings.ps1", ".gitignore", "README.md", "PublishNavContainerHelper.ps1") -Recurse
Remove-Item -Path (Join-Path $path ".git") -Force -Recurse
Remove-Item -Path (Join-Path $path "Tests") -Force -Recurse
$version = Get-Content -Path (Join-Path $path 'Version.txt')
Write-Host "NavContainerHelper version $Version"
$modulePath = Join-Path $path "NavContainerHelper.psm1"
Import-Module $modulePath -DisableNameChecking
$functionsToExport = (get-module -Name NavContainerHelper).ExportedFunctions.Keys | Sort-Object
$aliasesToExport = (get-module -Name NavContainerHelper).ExportedAliases.Keys | Sort-Object
$releaseNotes = Get-Content -Path (Join-Path $path "ReleaseNotes.txt")
$idx = $releaseNotes.IndexOf($version)
if ($idx -lt 0) {
throw 'No release notes identified'
}
$versionReleaseNotes = @()
while ($releaseNotes[$idx]) {
$versionReleaseNotes += $releaseNotes[$idx]
$idx++
}
Write-Host "Release Notes:"
Write-Host $VersionReleaseNotes
Write-Host "Update Module Manifest"
Update-ModuleManifest -Path (Join-Path $path "NavContainerHelper.psd1") `
-RootModule "NavContainerHelper.psm1" `
-FileList @("ContainerHandling\docker.ico") `
-ModuleVersion $version `
-Author $author `
-Author "Freddy Kristiansen" `
-FunctionsToExport $functionsToExport `
-AliasesToExport $aliasesToExport `
-CompanyName $CompanyName `
-ReleaseNotes (get-content (Join-Path $path "ReleaseNotes.txt"))
-CompanyName "Microsoft" `
-ReleaseNotes $versionReleaseNotes
Copy-Item -Path (Join-Path $path "NavContainerHelper.psd1") -Destination $PSScriptRoot -Force
Publish-Module -Path $path -NuGetApiKey $nugetkey
Remove-Item -Path $path -Force -Recurse
Write-Host "Publishing Module"
#Publish-Module -Path $path -NuGetApiKey $(nugetkey)