Skip to content

Commit

Permalink
Merge pull request #81 from PlagueHO/Issue-78
Browse files Browse the repository at this point in the history
Use DSCResource.Common, Pin Pester and Support ModuleBuilder 1.7.0
  • Loading branch information
PlagueHO committed Jun 14, 2020
2 parents 98dc1ef + 8a5775e commit d3a541c
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 1,084 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Change Azure DevOps Pipeline definition to include `source/*` - fixes [Issue #75](https://github.com/dsccommunity/WSManDsc/issues/75).
- Updated pipeline to use `latest` version of `ModuleBuilder` - fixes [Issue #75](https://github.com/dsccommunity/WSManDsc/issues/75).
- Merge `HISTORIC_CHANGELOG.md` into `CHANGELOG.md` - fixes [Issue #76](https://github.com/dsccommunity/WSManDsc/issues/76).
- WSManDsc
- Updated to use the common module _DscResource.Common_ - Fixes [Issue #78](https://github.com/dsccommunity/WSManDsc/issues/78).
- Fixed build failures caused by changes in `ModuleBuilder` module v1.7.0
by changing `CopyDirectories` to `CopyPaths` - Fixes [Issue #79](https://github.com/dsccommunity/WSManDsc/issues/79).
- Pin `Pester` module to 4.10.1 because Pester 5.0 is missing code
coverage - Fixes [Issue #78](https://github.com/dsccommunity/WSManDsc/issues/78).

## [3.1.1] - 2020-01-31

Expand Down
5 changes: 3 additions & 2 deletions RequiredModules.psd1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@{
PSDependOptions = @{
PSDependOptions = @{
AddToPath = $True
Target = 'output\RequiredModules'
Parameters = @{
Expand All @@ -9,13 +9,14 @@

InvokeBuild = 'latest'
PSScriptAnalyzer = 'latest'
Pester = 'latest'
Pester = '4.10.1'
Plaster = 'latest'
ModuleBuilder = 'latest'
ChangelogManagement = 'latest'
Sampler = 'latest'
'DscResource.Test' = 'latest'
'DscResource.AnalyzerRules' = 'latest'
'DscResource.DocGenerator' = 'latest'
'DscResource.Common' = 'latest'
xDscResourceDesigner = 'latest'
}
17 changes: 15 additions & 2 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@
####################################################
# ModuleBuilder Configuration #
####################################################
CopyDirectories:
CopyPaths:
- en-US
- DSCResources
- Modules
Encoding: UTF8
VersionedOutputDirectory: true

####################################################
# ModuleBuilder Dependent Modules Configuration #
####################################################

NestedModule:
DscResource.Common:
CopyOnly: true
Path: ./output/RequiredModules/DscResource.Common
AddToManifest: false
Exclude: PSGetModuleInfo.xml

####################################################
# Pipeline Configuration #
####################################################
Expand Down Expand Up @@ -47,6 +57,7 @@ BuildWorkflow:
Pester:
OutputFormat: NUnitXML
ExcludeFromCodeCoverage:
- Modules/DscResource.Common
Script:
- tests/Unit
ExcludeTag:
Expand All @@ -59,6 +70,8 @@ DscTest:
- 'Common Tests - New Error-Level Script Analyzer Rules'
ExcludeSourceFile:
- output
ExcludeModuleFile:
- Modules/DscResource.Common

Resolve-Dependency:
Gallery: 'PSGallery'
Expand Down
7 changes: 2 additions & 5 deletions source/DSCResources/DSC_WSManConfig/DSC_WSManConfig.psm1
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'

# Import the Networking Resource Helper Module
Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'WSManDsc.Common' `
-ChildPath 'WSManDsc.Common.psm1'))
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')

# Import Localization Strings
$script:localizedData = Get-LocalizedData -ResourceName 'DSC_WSManConfig'
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'

<#
This is an array of all the parameters used by this resource.
Expand Down
8 changes: 3 additions & 5 deletions source/DSCResources/DSC_WSManListener/DSC_WSManListener.psm1
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'

# Import the Networking Resource Helper Module
Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'WSManDsc.Common' `
-ChildPath 'WSManDsc.Common.psm1'))
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')

# Import Localization Strings
$script:localizedData = Get-LocalizedData -ResourceName 'DSC_WSManListener'
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'


# Standard Transport Ports
$Default_HTTP_Port = 5985
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
$modulePath = Join-Path -Path (Split-Path -Path (Split-Path -Path $PSScriptRoot -Parent) -Parent) -ChildPath 'Modules'

# Import the Networking Resource Helper Module
Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'WSManDsc.Common' `
-ChildPath 'WSManDsc.Common.psm1'))
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')

# Import Localization Strings
$script:localizedData = Get-LocalizedData -ResourceName 'DSC_WSManServiceConfig'
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'

<#
This is an array of all the parameters used by this resource.
Expand Down
39 changes: 0 additions & 39 deletions source/Modules/WSManDsc.Common/WSManDsc.Common.psd1

This file was deleted.

Loading

0 comments on commit d3a541c

Please sign in to comment.