Skip to content

Commit a3ed797

Browse files
authored
Merge pull request #52 from PlagueHO/Issue-48
Convert to DSCResource.Common
2 parents 7c67b9f + 917736e commit a3ed797

File tree

13 files changed

+153
-1137
lines changed

13 files changed

+153
-1137
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
- Change Azure DevOps Pipeline definition to include `source/*` - Fixes [Issue #45](https://github.com/dsccommunity/FileContentDsc/issues/45).
1717
- Updated pipeline to use `latest` version of `ModuleBuilder` - Fixes [Issue #45](https://github.com/dsccommunity/FileContentDsc/issues/45).
1818
- Merge `HISTORIC_CHANGELOG.md` into `CHANGELOG.md` - Fixes [Issue #46](https://github.com/dsccommunity/FileContentDsc/issues/46).
19+
- Fixed build failures caused by changes in `ModuleBuilder` module v1.7.0
20+
by changing `CopyDirectories` to `CopyPaths` - Fixes [Issue #49](https://github.com/dsccommunity/FileContentDsc/issues/49).
21+
- Updated to use the common module _DscResource.Common_ - Fixes [Issue #48](https://github.com/dsccommunity/FileContentDsc/issues/48).
22+
- Pin `Pester` module to 4.10.1 because Pester 5.0 is missing code
23+
coverage - Fixes [Issue #50](https://github.com/dsccommunity/FileContentDsc/issues/50).
24+
- Automatically publish documentation to GitHub Wiki - Fixes [Issue #51](https://github.com/dsccommunity/FileContentDsc/issues/51).
1925

2026
## [1.3.0.151] - 2019-07-20
2127

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,7 +9,7 @@
99

1010
InvokeBuild = 'latest'
1111
PSScriptAnalyzer = 'latest'
12-
Pester = 'latest'
12+
Pester = '4.10.1'
1313
Plaster = 'latest'
1414
ModuleBuilder = 'latest'
1515
ChangelogManagement = 'latest'
@@ -18,5 +18,6 @@
1818
'DscResource.Test' = 'latest'
1919
'DscResource.AnalyzerRules' = 'latest'
2020
'DscResource.DocGenerator' = 'latest'
21+
'DscResource.Common' = 'latest'
2122
xDscResourceDesigner = 'latest'
2223
}

build.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,24 @@
22
####################################################
33
# ModuleBuilder Configuration #
44
####################################################
5-
CopyDirectories:
5+
CopyPaths:
66
- en-US
77
- DSCResources
88
- Modules
99
Encoding: UTF8
1010
VersionedOutputDirectory: true
1111

12+
####################################################
13+
# ModuleBuilder Dependent Modules Configuration #
14+
####################################################
15+
16+
NestedModule:
17+
DscResource.Common:
18+
CopyOnly: true
19+
Path: ./output/RequiredModules/DscResource.Common
20+
AddToManifest: false
21+
Exclude: PSGetModuleInfo.xml
22+
1223
####################################################
1324
# Pipeline Configuration #
1425
####################################################
@@ -34,12 +45,12 @@ BuildWorkflow:
3445

3546
test:
3647
- Pester_Tests_Stop_On_Fail
37-
- Pester_if_Code_Coverage_Under_Threshold
48+
- Pester_If_Code_Coverage_Under_Threshold
3849

3950
publish:
40-
- Publish_release_to_GitHub
41-
- publish_module_to_gallery
42-
51+
- Publish_Release_to_GitHub
52+
- Publish_Module_to_gallery
53+
- Publish_GitHub_Wiki_Content
4354

4455
####################################################
4556
# PESTER Configuration #
@@ -48,18 +59,21 @@ BuildWorkflow:
4859
Pester:
4960
OutputFormat: NUnitXML
5061
ExcludeFromCodeCoverage:
62+
- Modules/DscResource.Common
5163
Script:
5264
- tests/Unit
5365
ExcludeTag:
5466
Tag:
55-
CodeCoverageThreshold: 65
67+
CodeCoverageThreshold: 70
5668

5769
DscTest:
5870
OutputFormat: NUnitXML
5971
ExcludeTag:
6072
- 'Common Tests - New Error-Level Script Analyzer Rules'
6173
ExcludeSourceFile:
6274
- output
75+
ExcludeModuleFile:
76+
- Modules/DscResource.Common
6377

6478
Resolve-Dependency:
6579
Gallery: 'PSGallery'

source/DSCResources/DSC_IniSettingsFile/DSC_IniSettingsFile.psm1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ Import-Module -Name (Join-Path -Path $modulePath `
77
-ChildPath (Join-Path -Path 'FileContentDsc.Common' `
88
-ChildPath 'FileContentDsc.Common.psm1'))
99

10+
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')
11+
1012
# Import Localization Strings
11-
$script:localizedData = Get-LocalizedData -ResourceName 'DSC_IniSettingsFile'
13+
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
1214

1315
<#
1416
.SYNOPSIS

source/DSCResources/DSC_KeyValuePairFile/DSC_KeyValuePairFile.psm1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ Import-Module -Name (Join-Path -Path $modulePath `
77
-ChildPath (Join-Path -Path 'FileContentDsc.Common' `
88
-ChildPath 'FileContentDsc.Common.psm1'))
99

10+
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')
11+
1012
# Import Localization Strings
11-
$script:localizedData = Get-LocalizedData -ResourceName 'DSC_KeyValuePairFile'
13+
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
1214

1315
<#
1416
.SYNOPSIS

source/DSCResources/DSC_ReplaceText/DSC_ReplaceText.psm1

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ Import-Module -Name (Join-Path -Path $modulePath `
77
-ChildPath (Join-Path -Path 'FileContentDsc.Common' `
88
-ChildPath 'FileContentDsc.Common.psm1'))
99

10+
Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')
11+
1012
# Import Localization Strings
11-
$script:localizedData = Get-LocalizedData -ResourceName 'DSC_ReplaceText'
13+
$script:localizedData = Get-LocalizedData -DefaultUICulture 'en-US'
1214

1315
<#
1416
.SYNOPSIS

0 commit comments

Comments
 (0)