File tree 3 files changed +25
-4
lines changed
3 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5
5
6
6
## [ Unreleased]
7
7
8
+ - ` Get-ClassResourceProperty `
9
+ - Check for a prefixed and non-prefixed class names [ issue #132 ] ( https://github.com/dsccommunity/DscResource.DocGenerator/issues/132 ) .
10
+ - ` azure-pipelines `
11
+ - Pin gitversion to V5.
12
+
8
13
## [ 0.12.4] - 2024-06-03
9
14
10
15
### Fixed
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ stages:
27
27
vmImage : ' ubuntu-latest'
28
28
steps :
29
29
- pwsh : |
30
- dotnet tool install --global GitVersion.Tool
30
+ dotnet tool install --global GitVersion.Tool --version 5.*
31
31
$gitVersionObject = dotnet-gitversion | ConvertFrom-Json
32
32
$gitVersionObject.PSObject.Properties.ForEach{
33
33
Write-Host -Object "Setting Task Variable '$($_.Name)' with value '$($_.Value)'."
Original file line number Diff line number Diff line change @@ -44,13 +44,29 @@ function Get-ClassResourceProperty
44
44
{
45
45
$dscResourceAst = Get-ClassAst - ClassName $currentClassName - ScriptFile $BuiltModuleScriptFilePath
46
46
47
- $sourceFilePath = Join-Path - Path $SourcePath - ChildPath (' Classes/???.{0}.ps1' -f $currentClassName )
47
+ $classExists = $false
48
+ $sourceFilePath = ' '
49
+ $childPaths = @ (
50
+ (' Classes/???.{0}.ps1' -f $currentClassName )
51
+ (' Classes/{0}.ps1' -f $currentClassName )
52
+ )
53
+
54
+ foreach ($childPath in $childPaths )
55
+ {
56
+ $sourceFilePath = Join-Path - Path $SourcePath - ChildPath $childPath
57
+
58
+ if ((Test-Path - Path $sourceFilePath ))
59
+ {
60
+ $classExists = $true
61
+ break
62
+ }
63
+ }
48
64
49
65
<#
50
- Skip if the class's source file does not exist. Thi can happen if the
66
+ Skip if the class's source file does not exist. This can happen if the
51
67
class uses a parent class from a different module.
52
68
#>
53
- if (-not ( Test-Path - Path $sourceFilePath ) )
69
+ if (-not $classExists )
54
70
{
55
71
continue
56
72
}
You can’t perform that action at this time.
0 commit comments