Skip to content

Commit

Permalink
Merge pull request #497 from sdwheeler/sdw-cabsize
Browse files Browse the repository at this point in the history
Update New-ExternalHelpCab to build large cab file
  • Loading branch information
SteveL-MSFT authored Jan 12, 2021
2 parents 543fade + 6148725 commit 97c43cb
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ CHANGELOG

## Not released

# 0.14.1

- Fix appveyor build script
- Update-Help for selected modules only
- Pin Pester to version 4.10.1
- Add makecab directive to set size limit to `CDROM`

# 0.14.0

* Fix passing `ExcludeDontShow` flag to modules (#459)
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ install:
- ps: |
Write-Host "PowerShell Version:" $PSVersionTable.PSVersion.tostring()
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module Pester -Force
Install-Module -Name Pester -RequiredVersion 4.10.1 -Force
init:
- git config --global core.autocrlf true

build_script:
- ps: |
$ErrorActionPreference = 'Stop'
Update-Help # we need up-to-date help content for tests
Update-Help Microsoft.PowerShell.Core, Microsoft.PowerShell.Management, Microsoft.PowerShell.Utility -Force # we need up-to-date help content for tests
.\build.ps1 -Configuration Release
test_script:
Expand Down
1 change: 1 addition & 0 deletions src/platyPS/platyPS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
RootModule = 'platyPS.psm1'

# Version number of this module.
# Do not edit the version. The version is updated by the build script.
ModuleVersion = '0.0.1'

# ID used to uniquely identify this module
Expand Down
1 change: 1 addition & 0 deletions src/platyPS/platyPS.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,7 @@ function New-ExternalHelpCab
New-Item -ItemType File -Name $DirectiveFile -Force | Out-Null
Add-Content $DirectiveFile ".Set Cabinet=on"
Add-Content $DirectiveFile ".Set Compress=on"
Add-Content $DirectiveFile ".Set MaxDiskSize=CDROM"

#Creates an entry in the cab directive file for each file in the source directory (uses FullName to get fuly qualified file path and name)
foreach($file in $ValidHelpFiles)
Expand Down
4 changes: 2 additions & 2 deletions test/Pester/FullLoop.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $outFolder = "$root\out"
Import-Module $outFolder\platyPS -Force
$MyIsLinux = Get-Variable -Name IsLinux -ValueOnly -ErrorAction SilentlyContinue
$MyIsMacOS = Get-Variable -Name IsMacOS -ValueOnly -ErrorAction SilentlyContinue

<#
Describe 'Full loop for Add-Member cmdlet' {
$cmdlet = "Add-Member"
Expand Down Expand Up @@ -139,7 +139,7 @@ Describe 'Full loop for Add-Member cmdlet' {
# TODO: rest of properties!!
}

#>
function OutFileAndStripped
{
param([string]$path, [string]$content)
Expand Down
6 changes: 3 additions & 3 deletions test/Pester/PlatyPs.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -869,14 +869,14 @@ if (-not $global:IsUnix) {

$mamlModelObject.Name | Should be "Add-Computer"
$mamlModelObject.Synopsis.Text | Should be "Add the local computer to a domain or workgroup."
$mamlModelObject.Description.Text.Substring(0,135) | Should be "The Add-Computer cmdlet adds the local computer or remote computers to a domain or workgroup, or moves them from one domain to another."
$mamlModelObject.Notes.Text.Substring(0,31) | Should be "In Windows PowerShell 2.0, the "
$mamlModelObject.Description.Text.Substring(0,137) | Should be 'The `Add-Computer` cmdlet adds the local computer or remote computers to a domain or workgroup, or moves them from one domain to another.'
$mamlModelObject.Notes.Text.Substring(0,33) | Should be "- In Windows PowerShell 2.0, the "
}

It 'Validates the examples by checking Add-Computer Example 1' {

$mamlModelObject.Examples[0].Title | Should be "Example 1: Add a local computer to a domain then restart the computer"
$mamlModelObject.Examples[0].Code[0].Text | Should be "PS C:\>Add-Computer -DomainName `"Domain01`" -Restart"
$mamlModelObject.Examples[0].Code[0].Text | Should be "Add-Computer -DomainName Domain01 -Restart"
$mamlModelObject.Examples[0].Remarks.Substring(0,120) | Should be "This command adds the local computer to the Domain01 domain and then restarts the computer to make the change effective."

}
Expand Down

0 comments on commit 97c43cb

Please sign in to comment.