Skip to content

Commit 4353b2f

Browse files
authored
Merge pull request cds-hooks#584 from buildpacks/project-descriptor-v2
Update docs to project descriptor v2
2 parents 2e89efc + 096e80b commit 4353b2f

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

content/docs/app-developer-guide/using-project-descriptor.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ Note the `include` and `exclude` sections in the below `project.toml` file use `
1919
file at the root of the application. For more on `gitignore` matching see [these docs](https://linuxize.com/post/gitignore-ignoring-files-in-git/#literal-file-names).
2020

2121
```toml
22-
[project]
22+
[_]
2323
id = "io.buildpacks.bash-script"
2424
name = "Bash Script"
2525
version = "1.0.0"
2626

27-
[build]
27+
[io.buildpacks]
2828
exclude = [
2929
"/README.md",
3030
"bash-script-buildpack"
3131
]
3232

3333
include = []
3434

35-
[[build.buildpacks]]
35+
[[io.buildpacks.group]]
3636
uri = "bash-script-buildpack/"
3737
```
3838

@@ -67,24 +67,24 @@ understand the environment), we would want to add it to our `project.toml`.
6767
Below is an expanded `project.toml`, with an additional buildpack and environment variable included.
6868

6969
```toml
70-
[project]
70+
[_]
7171
id = "io.buildpacks.bash-script"
7272
name = "Bash Script"
7373
version = "1.0.0"
7474

75-
[build]
75+
[io.buildpacks]
7676
exclude = [
7777
"README.md",
7878
"bash-script-buildpack"
7979
]
80-
[[build.buildpacks]]
80+
[[io.buildpacks.group]]
8181
uri = "../../buildpacks/hello-world/"
8282

8383

84-
[[build.buildpacks]]
84+
[[io.buildpacks.group]]
8585
uri = "bash-script-buildpack/"
8686

87-
[[build.env]]
87+
[[io.buildpacks.build.env]]
8888
name='HELLO'
8989
value='WORLD'
9090
```

content/docs/reference/config/project-descriptor.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $ pack build --descriptor <project-descriptor path>
1212

1313
The schema for the `project descriptor` is:
1414

15-
- #### `project` _(table, optional)_
15+
- #### `_` _(table, optional)_
1616
A configuration table for a project.
1717

1818
- **`id`** _(string, optional)_\
@@ -42,10 +42,10 @@ The schema for the `project descriptor` is:
4242
- **`uri`** _(string, optional)_\
4343
If the project uses a nonstandard license, you may use `uri` to point to the license.
4444

45-
- #### `build` _(table, optional)_
45+
- #### `io.buildpacks` _(table, optional)_
4646
A list of specifications for build-time configuration of the project.
4747

48-
- **`env`** _(list, optional)_
48+
- **`build.env`** _(list, optional)_
4949
You can set environment variables at build time, by defining each with the following fields:
5050

5151
- **`name`** _(string, optional)_\
@@ -64,7 +64,7 @@ The schema for the `project descriptor` is:
6464

6565
> If `include` and `exclude` are both present, the lifecycle will error out.
6666
67-
- **`buildpacks`** _(list, optional)_
67+
- **`group`** _(list, optional)_
6868
A list of buildpacks. Either a `version`, `uri`, or `script` table must be included, but it must not include any combination of these elements.
6969

7070
- **`id`** _(string, optional)_\
@@ -94,34 +94,34 @@ The schema for the `project descriptor` is:
9494
## Example
9595
An example `project.toml` is:
9696
```toml
97-
[project]
97+
[_]
9898
id = "io.buildpacks.my-app"
9999
version = "0.1"
100100

101-
[build]
101+
[io.buildpacks]
102102
include = [
103103
"cmd/",
104104
"go.mod",
105105
"go.sum",
106106
"*.go"
107107
]
108108

109-
[[build.env]]
109+
[[io.buildpacks.build.env]]
110110
name = "JAVA_OPTS"
111111
value = "-Xmx1g"
112112

113-
[[build.buildpacks]]
113+
[[io.buildpacks.group]]
114114
id = "io.buildpacks/java"
115115
version = "1.0"
116116

117-
[[build.buildpacks]]
117+
[[io.buildpacks.group]]
118118
id = "io.buildpacks/nodejs"
119119
version = "1.0"
120120

121-
[metadata]
121+
[_.metadata]
122122
foo = "bar"
123123

124-
[metadata.fizz]
124+
[_.metadata.fizz]
125125
buzz = ["a", "b", "c"]
126126
```
127127

0 commit comments

Comments
 (0)