Skip to content

Commit

Permalink
ComputerManagementDsc: Class-based resources re-use module DscResourc…
Browse files Browse the repository at this point in the history
…e.Base (#405)

* ComputerManagementDsc: Class-based resources re-use module DscResource.Base

* Fix CHANGELOG.md

* Fix CHANGELOG.md

* Merge branch 'main' into f/remove-resourcebase

Co-Authored-By: Daniel Scott-Raynsford <[email protected]>
  • Loading branch information
johlju and PlagueHO authored Feb 25, 2023
1 parent 03395c4 commit 41ec47e
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 852 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
in the module manifest in the source folder as the built module is
automatically updated with this information by the pipeline - Fixes [Issue #396](https://github.com/dsccommunity/ComputerManagementDsc/issues/396).
- Moved the build step of the pipeline to a Windows build worker when running in Azure DevOps.
- The class-based resources are now re-using the module DscResource.Base - Fixes [Issue #404](https://github.com/dsccommunity/ComputerManagementDsc/issues/404).
- Removed the file `source/build.psd1` as it is no longer required for the
build pipeline.

## [8.5.0] - 2021-09-13

Expand Down
1 change: 1 addition & 0 deletions RequiredModules.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
'DscResource.AnalyzerRules' = 'latest'
'DscResource.DocGenerator' = 'latest'
'DscResource.Common' = 'latest'
'DscResource.Base' = 'latest'
xDscResourceDesigner = 'latest'
LoopbackAdapter = 'latest'
}
8 changes: 8 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ NestedModule:
AddToManifest: false
Exclude: PSGetModuleInfo.xml

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

####################################################
# Pipeline Configuration #
####################################################
Expand Down Expand Up @@ -62,6 +68,7 @@ Pester:
OutputFormat: NUnitXML
ExcludeFromCodeCoverage:
- Modules/DscResource.Common
- Modules/DscResource.Base
Script:
- tests/Unit
ExcludeTag:
Expand All @@ -78,6 +85,7 @@ DscTest:
- output
ExcludeModuleFile:
- Modules/DscResource.Common
- Modules/DscResource.Base
MainGitBranch: main

Resolve-Dependency:
Expand Down
5 changes: 0 additions & 5 deletions source/Build.psd1

This file was deleted.

260 changes: 0 additions & 260 deletions source/Classes/010.ResourceBase.ps1

This file was deleted.

3 changes: 2 additions & 1 deletion source/Classes/020.PSResourceRepository.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ class PSResourceRepository : ResourceBase
[Nullable[System.Boolean]]
$Default

PSResourceRepository () : base ()
# Passing the module's base directory to the base constructor so it finds localization files.
PSResourceRepository () : base ($PSScriptRoot)
{
# These properties will not be enforced.
$this.ExcludeDscProperties = @(
Expand Down
9 changes: 0 additions & 9 deletions source/Enum/1.Ensure.ps1

This file was deleted.

44 changes: 0 additions & 44 deletions source/Private/ConvertFrom-CompareResult.ps1

This file was deleted.

Loading

0 comments on commit 41ec47e

Please sign in to comment.