Skip to content

Commit d3a541c

Browse files
authored
Merge pull request #81 from PlagueHO/Issue-78
Use DSCResource.Common, Pin Pester and Support ModuleBuilder 1.7.0
2 parents 98dc1ef + 8a5775e commit d3a541c

File tree

10 files changed

+31
-1084
lines changed

10 files changed

+31
-1084
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2424
- Change Azure DevOps Pipeline definition to include `source/*` - fixes [Issue #75](https://github.com/dsccommunity/WSManDsc/issues/75).
2525
- Updated pipeline to use `latest` version of `ModuleBuilder` - fixes [Issue #75](https://github.com/dsccommunity/WSManDsc/issues/75).
2626
- Merge `HISTORIC_CHANGELOG.md` into `CHANGELOG.md` - fixes [Issue #76](https://github.com/dsccommunity/WSManDsc/issues/76).
27+
- WSManDsc
28+
- Updated to use the common module _DscResource.Common_ - Fixes [Issue #78](https://github.com/dsccommunity/WSManDsc/issues/78).
29+
- Fixed build failures caused by changes in `ModuleBuilder` module v1.7.0
30+
by changing `CopyDirectories` to `CopyPaths` - Fixes [Issue #79](https://github.com/dsccommunity/WSManDsc/issues/79).
31+
- Pin `Pester` module to 4.10.1 because Pester 5.0 is missing code
32+
coverage - Fixes [Issue #78](https://github.com/dsccommunity/WSManDsc/issues/78).
2733

2834
## [3.1.1] - 2020-01-31
2935

RequiredModules.psd1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@{
2-
PSDependOptions = @{
2+
PSDependOptions = @{
33
AddToPath = $True
44
Target = 'output\RequiredModules'
55
Parameters = @{
@@ -9,13 +9,14 @@
99

1010
InvokeBuild = 'latest'
1111
PSScriptAnalyzer = 'latest'
12-
Pester = 'latest'
12+
Pester = '4.10.1'
1313
Plaster = 'latest'
1414
ModuleBuilder = 'latest'
1515
ChangelogManagement = 'latest'
1616
Sampler = 'latest'
1717
'DscResource.Test' = 'latest'
1818
'DscResource.AnalyzerRules' = 'latest'
1919
'DscResource.DocGenerator' = 'latest'
20+
'DscResource.Common' = 'latest'
2021
xDscResourceDesigner = 'latest'
2122
}

build.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@
22
####################################################
33
# ModuleBuilder Configuration #
44
####################################################
5-
CopyDirectories:
5+
CopyPaths:
66
- en-US
77
- DSCResources
8-
- Modules
98
Encoding: UTF8
109
VersionedOutputDirectory: true
1110

11+
####################################################
12+
# ModuleBuilder Dependent Modules Configuration #
13+
####################################################
14+
15+
NestedModule:
16+
DscResource.Common:
17+
CopyOnly: true
18+
Path: ./output/RequiredModules/DscResource.Common
19+
AddToManifest: false
20+
Exclude: PSGetModuleInfo.xml
21+
1222
####################################################
1323
# Pipeline Configuration #
1424
####################################################
@@ -47,6 +57,7 @@ BuildWorkflow:
4757
Pester:
4858
OutputFormat: NUnitXML
4959
ExcludeFromCodeCoverage:
60+
- Modules/DscResource.Common
5061
Script:
5162
- tests/Unit
5263
ExcludeTag:
@@ -59,6 +70,8 @@ DscTest:
5970
- 'Common Tests - New Error-Level Script Analyzer Rules'
6071
ExcludeSourceFile:
6172
- output
73+
ExcludeModuleFile:
74+
- Modules/DscResource.Common
6275

6376
Resolve-Dependency:
6477
Gallery: 'PSGallery'

source/DSCResources/DSC_WSManConfig/DSC_WSManConfig.psm1

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'
22

3-
# Import the Networking Resource Helper Module
4-
Import-Module -Name (Join-Path -Path $modulePath `
5-
-ChildPath (Join-Path -Path 'WSManDsc.Common' `
6-
-ChildPath 'WSManDsc.Common.psm1'))
3+
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')
74

85
# Import Localization Strings
9-
$script:localizedData = Get-LocalizedData -ResourceName 'DSC_WSManConfig'
6+
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
107

118
<#
129
This is an array of all the parameters used by this resource.

source/DSCResources/DSC_WSManListener/DSC_WSManListener.psm1

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'
22

3-
# Import the Networking Resource Helper Module
4-
Import-Module -Name (Join-Path -Path $modulePath `
5-
-ChildPath (Join-Path -Path 'WSManDsc.Common' `
6-
-ChildPath 'WSManDsc.Common.psm1'))
3+
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')
74

85
# Import Localization Strings
9-
$script:localizedData = Get-LocalizedData -ResourceName 'DSC_WSManListener'
6+
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
7+
108

119
# Standard Transport Ports
1210
$Default_HTTP_Port = 5985

source/DSCResources/DSC_WSManServiceConfig/DSC_WSManServiceConfig.psm1

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'
22

3-
# Import the Networking Resource Helper Module
4-
Import-Module -Name (Join-Path -Path $modulePath `
5-
-ChildPath (Join-Path -Path 'WSManDsc.Common' `
6-
-ChildPath 'WSManDsc.Common.psm1'))
3+
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')
74

85
# Import Localization Strings
9-
$script:localizedData = Get-LocalizedData -ResourceName 'DSC_WSManServiceConfig'
6+
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
107

118
<#
129
This is an array of all the parameters used by this resource.

source/Modules/WSManDsc.Common/WSManDsc.Common.psd1

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)