Skip to content

Commit

Permalink
Merge pull request #52 from PlagueHO/Issue-48
Browse files Browse the repository at this point in the history
Convert to DSCResource.Common
  • Loading branch information
PlagueHO authored Jul 5, 2020
2 parents 7c67b9f + 917736e commit a3ed797
Show file tree
Hide file tree
Showing 13 changed files with 153 additions and 1,137 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,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 #45](https://github.com/dsccommunity/FileContentDsc/issues/45).
- Updated pipeline to use `latest` version of `ModuleBuilder` - Fixes [Issue #45](https://github.com/dsccommunity/FileContentDsc/issues/45).
- Merge `HISTORIC_CHANGELOG.md` into `CHANGELOG.md` - Fixes [Issue #46](https://github.com/dsccommunity/FileContentDsc/issues/46).
- Fixed build failures caused by changes in `ModuleBuilder` module v1.7.0
by changing `CopyDirectories` to `CopyPaths` - Fixes [Issue #49](https://github.com/dsccommunity/FileContentDsc/issues/49).
- Updated to use the common module _DscResource.Common_ - Fixes [Issue #48](https://github.com/dsccommunity/FileContentDsc/issues/48).
- Pin `Pester` module to 4.10.1 because Pester 5.0 is missing code
coverage - Fixes [Issue #50](https://github.com/dsccommunity/FileContentDsc/issues/50).
- Automatically publish documentation to GitHub Wiki - Fixes [Issue #51](https://github.com/dsccommunity/FileContentDsc/issues/51).

## [1.3.0.151] - 2019-07-20

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

InvokeBuild = 'latest'
PSScriptAnalyzer = 'latest'
Pester = 'latest'
Pester = '4.10.1'
Plaster = 'latest'
ModuleBuilder = 'latest'
ChangelogManagement = 'latest'
Expand All @@ -18,5 +18,6 @@
'DscResource.Test' = 'latest'
'DscResource.AnalyzerRules' = 'latest'
'DscResource.DocGenerator' = 'latest'
'DscResource.Common' = 'latest'
xDscResourceDesigner = 'latest'
}
26 changes: 20 additions & 6 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@
####################################################
# 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 All @@ -34,12 +45,12 @@ BuildWorkflow:

test:
- Pester_Tests_Stop_On_Fail
- Pester_if_Code_Coverage_Under_Threshold
- Pester_If_Code_Coverage_Under_Threshold

publish:
- Publish_release_to_GitHub
- publish_module_to_gallery

- Publish_Release_to_GitHub
- Publish_Module_to_gallery
- Publish_GitHub_Wiki_Content

####################################################
# PESTER Configuration #
Expand All @@ -48,18 +59,21 @@ BuildWorkflow:
Pester:
OutputFormat: NUnitXML
ExcludeFromCodeCoverage:
- Modules/DscResource.Common
Script:
- tests/Unit
ExcludeTag:
Tag:
CodeCoverageThreshold: 65
CodeCoverageThreshold: 70

DscTest:
OutputFormat: NUnitXML
ExcludeTag:
- 'Common Tests - New Error-Level Script Analyzer Rules'
ExcludeSourceFile:
- output
ExcludeModuleFile:
- Modules/DscResource.Common

Resolve-Dependency:
Gallery: 'PSGallery'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'FileContentDsc.Common' `
-ChildPath 'FileContentDsc.Common.psm1'))

Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')

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

<#
.SYNOPSIS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'FileContentDsc.Common' `
-ChildPath 'FileContentDsc.Common.psm1'))

Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')

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

<#
.SYNOPSIS
Expand Down
4 changes: 3 additions & 1 deletion source/DSCResources/DSC_ReplaceText/DSC_ReplaceText.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ Import-Module -Name (Join-Path -Path $modulePath `
-ChildPath (Join-Path -Path 'FileContentDsc.Common' `
-ChildPath 'FileContentDsc.Common.psm1'))

Import-Module -Name (Join-Path -Path $modulePath -ChildPath 'DscResource.Common')

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

<#
.SYNOPSIS
Expand Down
Loading

0 comments on commit a3ed797

Please sign in to comment.