diff --git a/build.ps1 b/build.ps1 index 51b0ca46..ebe715a9 100644 --- a/build.ps1 +++ b/build.ps1 @@ -132,7 +132,7 @@ foreach ($project in $projects) { Copy-Item "$path/$project" $target -ErrorAction Ignore } - Copy-Item "*.resource.json" $target -Force -ErrorAction Ignore + Copy-Item "*.dsc.resource.json" $target -Force -ErrorAction Ignore Copy-Item "*.resource.ps1" $target -Force -ErrorAction Ignore Copy-Item "*.command.json" $target -Force -ErrorAction Ignore @@ -174,7 +174,7 @@ if (!$found) { if ($Test) { $failed = $false - + $FullyQualifiedName = @{ModuleName="PSDesiredStateConfiguration";ModuleVersion="2.0.7"} if (-not(Get-Module -ListAvailable -FullyQualifiedName $FullyQualifiedName)) { "Installing module PSDesiredStateConfiguration 2.0.7" diff --git a/dsc/assertion.resource.json b/dsc/assertion.dsc.resource.json similarity index 100% rename from dsc/assertion.resource.json rename to dsc/assertion.dsc.resource.json diff --git a/dsc/group.resource.json b/dsc/group.dsc.resource.json similarity index 100% rename from dsc/group.resource.json rename to dsc/group.dsc.resource.json diff --git a/dsc/parallel.resource.json b/dsc/parallel.dsc.resource.json similarity index 100% rename from dsc/parallel.resource.json rename to dsc/parallel.dsc.resource.json diff --git a/dsc_lib/src/discovery/command_discovery.rs b/dsc_lib/src/discovery/command_discovery.rs index 6fca5da8..ee4535ae 100644 --- a/dsc_lib/src/discovery/command_discovery.rs +++ b/dsc_lib/src/discovery/command_discovery.rs @@ -59,7 +59,7 @@ impl ResourceDiscovery for CommandDiscovery { let path = entry.path(); if path.is_file() { let file_name = path.file_name().unwrap().to_str().unwrap(); - if file_name.ends_with(".resource.json") { + if file_name.to_lowercase().ends_with(".dsc.resource.json") { let resource = import_manifest(&path)?; if resource.manifest.is_some() { let manifest = serde_json::from_value::(resource.manifest.clone().unwrap())?; diff --git a/osinfo/osinfo.resource.json b/osinfo/osinfo.dsc.resource.json similarity index 100% rename from osinfo/osinfo.resource.json rename to osinfo/osinfo.dsc.resource.json diff --git a/powershellgroup/powershellgroup.resource.json b/powershellgroup/powershellgroup.dsc.resource.json similarity index 100% rename from powershellgroup/powershellgroup.resource.json rename to powershellgroup/powershellgroup.dsc.resource.json diff --git a/registry/registry.resource.json b/registry/registry.dsc.resource.json similarity index 100% rename from registry/registry.resource.json rename to registry/registry.dsc.resource.json diff --git a/test_group_resource/testGroup.resource.json b/test_group_resource/testGroup.dsc.resource.json similarity index 100% rename from test_group_resource/testGroup.resource.json rename to test_group_resource/testGroup.dsc.resource.json diff --git a/test_group_resource/tests/provider.tests.ps1 b/test_group_resource/tests/provider.tests.ps1 index 5b66acde..5c4da0a1 100644 --- a/test_group_resource/tests/provider.tests.ps1 +++ b/test_group_resource/tests/provider.tests.ps1 @@ -52,7 +52,7 @@ Describe 'Resource provider tests' { '@ $oldPath = $env:PATH try { - Set-Content -Path testdrive:/invalid.resource.json -Value $invalid_manifest + Set-Content -Path testdrive:/invalid.dsc.resource.json -Value $invalid_manifest $env:PATH += [System.IO.Path]::PathSeparator + (Resolve-Path (Resolve-Path $TestDrive -Relative)) $out = dsc resource list *invalid* 2>&1