mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-01-15 17:30:37 -06:00
[build-script]: strip $schema from config jsons before embedding
This commit is contained in:
parent
4d7e6ded11
commit
26256e14f8
10
Compile.ps1
10
Compile.ps1
@ -70,7 +70,15 @@ Get-ChildItem "$workingdir\config" | Where-Object {$psitem.extension -eq ".json"
|
||||
# Replace every XML Special Character so it'll render correctly in final build
|
||||
# Only do so if json files has content to be displayed (for example the applications, tweaks, features json files)
|
||||
# Make an Array List containing every name at first level of Json File
|
||||
$jsonAsObject = $json | convertfrom-json
|
||||
[PSCustomObject]$jsonAsObject = $json | convertfrom-json
|
||||
|
||||
# Remove properties like $schema and such from the json object (we don't need it at this point)
|
||||
@(
|
||||
"`$schema"
|
||||
) | ForEach-Object {
|
||||
$jsonAsObject.PSObject.Properties.Remove($_) | Out-Null
|
||||
}
|
||||
|
||||
$firstLevelJsonList = [System.Collections.ArrayList]::new()
|
||||
$jsonAsObject.PSObject.Properties.Name | ForEach-Object {$null = $firstLevelJsonList.Add($_)}
|
||||
# Note:
|
||||
|
Loading…
Reference in New Issue
Block a user