Skip to content

Commit

Permalink
Merge pull request #116 from SteveL-MSFT/resource-extension
Browse files Browse the repository at this point in the history
rename from `.resource.json` to `.dsc.resource.json`
  • Loading branch information
SteveL-MSFT authored Aug 1, 2023
2 parents 26856c4 + d2e2e05 commit 66191b0
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion dsc_lib/src/discovery/command_discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<ResourceManifest>(resource.manifest.clone().unwrap())?;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion test_group_resource/tests/provider.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 66191b0

Please sign in to comment.