Skip to content

Commit d8efffb

Browse files
authored
Merge pull request cds-hooks#585 from buildpacks/using-project-descriptor
Update all project descriptors to schema-version 0.2
2 parents 4353b2f + 50ca3c7 commit d8efffb

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

content/docs/app-developer-guide/specify-buildpacks.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,25 @@ pack build sample-java-maven-app \
5454

5555
## Using a Project Descriptor
5656

57-
The [`project.toml`][project-toml] format allows for Buildpack URIs to be specified in the `[[build.buildpacks]]` table with the `uri` key.
57+
The [`project.toml`][project-toml] format allows for Buildpack URIs to be specified in the `[[io.buildpacks.group]]` table with the `uri` key.
5858

5959
##### Example:
6060

6161
```toml
62-
[project]
62+
[_]
63+
schema-version = "0.3"
6364
id = "sample-java-maven-app"
6465
name = "Sample Java App"
6566
version = "1.0.0"
6667

67-
[[build.buildpacks]]
68+
[[io.buildpacks.group]]
6869
uri = "samples/java-maven"
6970

70-
[[build.buildpacks]]
71+
[[io.buildpacks.group]]
7172
uri = "samples/buildpacks/hello-processes/"
7273

73-
[[build.buildpacks]]
74-
uri = "docker://cnbs/sample-package:hello-univers"
74+
[[io.buildpacks.group]]
75+
uri = "docker://cnbs/sample-package:hello-universe"
7576
```
7677

7778
## URI Examples

content/docs/app-developer-guide/using-inline-buildpacks.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,23 @@ summary="Learn how to create an ephemeral buildpack to customize your build."
66

77
You can supplement your app's build process with custom scripts by creating an _inline buildpack_. An inline buildpack is an ephemeral buildpack that's defined in your [project descriptor][project-toml] (i.e. `project.toml`). You can include a script to run as part of the build without setting up all the files and directories that are required for a complete buildpack.
88

9-
Inline buildpacks are defined as an entry in the `[[build.buildpacks]]` table of the project descriptor by including an `inline` script in the `[build.buildpacks.script]` table.
9+
Inline buildpacks are defined as an entry in the `[[io.buildpacks.group]]` table of the project descriptor by including an `inline` script in the `[io.buildpacks.group.script]` table.
1010

1111
For example, you may want to run a Rake task against a Ruby app after the Ruby buildpack builds your app.
1212

1313
```toml
14-
[project]
14+
[_]
15+
schema-version = "0.2"
1516
id = "io.buildpacks.my-app"
1617

17-
[[build.buildpacks]]
18+
[[io.buildpacks.group]]
1819
id = "example/ruby"
1920
version = "1.0"
2021

21-
[[build.buildpacks]]
22+
[[io.buildpacks.group]]
2223
id = "me/rake-tasks"
2324

24-
[build.buildpacks.script]
25+
[io.buildpacks.group.script]
2526
api = "0.6"
2627
inline = "rake package"
2728
```
@@ -33,10 +34,10 @@ In this example, the `me/rake-tasks` inline buildpack is configured to run after
3334
Inline buildpacks aren't constrained to a single command, however. You can define complex scripts as [heredocs](https://toml.io/en/v1.0.0#string) in your project descriptor. For example, this snippet of a descriptor will source a shell script contained in the app repo, use it to modify the app directory (and thus the files that go into the final image), and create slices for the app:
3435

3536
```toml
36-
[[build.buildpacks]]
37+
[[io.buildpacks.group]]
3738
id = "me/cleanup"
3839

39-
[build.buildpacks.script]
40+
[io.buildpacks.script]
4041
api = "0.9"
4142
inline = """
4243
set -e

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ The schema for the `project descriptor` is:
9595
An example `project.toml` is:
9696
```toml
9797
[_]
98+
schema-version = "0.2"
9899
id = "io.buildpacks.my-app"
99100
version = "0.1"
100101

0 commit comments

Comments
 (0)