Skip to content

Commit 0d6f9f1

Browse files
(MAINT) Define build data per-project
Prior to this change, any updates to project build configuration needed to land in the root `build.data.psd1` file. This made it relatively easy to forget to update the configuration when working on a specific project. This change: 1. Defines the configuration on a per-project basis in newly defined `.project.data.json` files. These files contain the build metadata for each project _except_ for the `RelativePath` field. 1. Replaces the root `build.data.psd1` file with `build.data.json` containing the same data. 1. Defines JSON Schemas to validate and provide in-editor help for modifying and creating new project data files and modifying the root build data file. 1. Updates the build helpers to work with JSON data files instead of the PSD1. 1. Provides a model to retrieve updated project data for use in the build script, even when the root build data file hasn't been updated yet. 1. Defines the helper function `Update-DscBuildData` to pull changes from the per-project data files into the root build data file. Except for using the JSON files, this change doesn't modify the build behavior. This change doesn't remove the `copy_files.txt` files, though they are now redundant with the project data files. Once we remove the old build script, the `copy_files.txt` files should also be removed.
1 parent e57d7e2 commit 0d6f9f1

File tree

32 files changed

+1251
-419
lines changed

32 files changed

+1251
-419
lines changed

.vscode/schemas/build.data.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$ref": "./definitions.json#/$defs/BuildDataFile"
4+
}

.vscode/schemas/definitions.json

Lines changed: 296 additions & 0 deletions
Large diffs are not rendered by default.

.vscode/schemas/project.data.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$ref": "./definitions.json#/$defs/ProjectDataFile"
4+
}

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
{
55
"fileMatch": ["**/*.dsc.resource.json"],
66
"url": "/schemas/v3/bundled/resource/manifest.vscode.json"
7+
},
8+
{
9+
"fileMatch": ["build.data.json"],
10+
"url": "./.vscode/schemas/build.data.json"
11+
},
12+
{
13+
"fileMatch": ["**/.project.data.json"],
14+
"url": "./.vscode/schemas/project.data.json"
715
}
816
],
917
"yaml.schemas": {

0 commit comments

Comments
 (0)