From 70fd180f5ca9d1c16272c5d4a63feb812235ae8b Mon Sep 17 00:00:00 2001 From: Aidan Delaney Date: Wed, 27 Nov 2024 05:48:03 +0000 Subject: [PATCH] Prefer targets over stacks When creating a new buildpack, use --targets instead of the deprecated --stacks --- .../basic-buildpack/02_building-blocks-cnb.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/content/docs/for-buildpack-authors/tutorials/basic-buildpack/02_building-blocks-cnb.md b/content/docs/for-buildpack-authors/tutorials/basic-buildpack/02_building-blocks-cnb.md index 739ed387a..55c72761b 100644 --- a/content/docs/for-buildpack-authors/tutorials/basic-buildpack/02_building-blocks-cnb.md +++ b/content/docs/for-buildpack-authors/tutorials/basic-buildpack/02_building-blocks-cnb.md @@ -25,7 +25,7 @@ pack buildpack new examples/node-js \ --api 0.10 \ --path node-js-buildpack \ --version 0.0.1 \ - --stacks io.buildpacks.samples.stacks.noble + --targets "linux/amd64" ``` This command will create `node-js-buildpack` directory which contains `buildpack.toml`, `bin/build`, `bin/detect` files. @@ -46,6 +46,11 @@ You will have `node-js-buildpack/buildpack.toml` in your buil ```toml # Buildpack API version api = "0.10" +# Enable to allow the buildpack to build on a Windows target +WithWindowsBuild = false +# Enable to force the buildpack to build only on supported Linux targets +# "false" by default, which allows the buildpack to build on *all* Linux targets +WithLinuxBuild = false # Buildpack ID and metadata [buildpack] @@ -54,12 +59,8 @@ api = "0.10" # Targets the buildpack will work with [[targets]] -os = "linux" - -# Stacks (deprecated) the buildpack will work with -[[stacks]] - id = "io.buildpacks.samples.stacks.noble" - + os = "linux" + arch = "amd64" ``` The buildpack ID is the way you will reference the buildpack when you create buildpack groups, builders, etc.