Skip to content

Commit

Permalink
Update test and example buildpacks
Browse files Browse the repository at this point in the history
  • Loading branch information
Malax committed Feb 9, 2024
1 parent 4efade1 commit c62d083
Show file tree
Hide file tree
Showing 16 changed files with 13 additions and 54 deletions.
5 changes: 1 addition & 4 deletions examples/basics/buildpack.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
api = "0.9"
api = "0.10"

[buildpack]
id = "libcnb-examples/basics"
version = "0.1.0"
name = "Example libcnb buildpack: basics"

[[stacks]]
id = "*"
8 changes: 6 additions & 2 deletions examples/basics/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@ impl Buildpack for BasicBuildpack {
DetectResultBuilder::pass().build()
}

fn build(&self, _context: BuildContext<Self>) -> libcnb::Result<BuildResult, Self::Error> {
// println!("Build runs on stack {}!", context.stack_id);
fn build(&self, context: BuildContext<Self>) -> libcnb::Result<BuildResult, Self::Error> {
println!(
"Build runs on: {} ({})!",
context.target_os, context.target_arch
);

BuildResultBuilder::new().build()
}
}
Expand Down
5 changes: 1 addition & 4 deletions examples/execd/buildpack.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
api = "0.9"
api = "0.10"

[buildpack]
id = "libcnb-examples/execd"
version = "0.1.0"
name = "Example libcnb buildpack: execd"

[[stacks]]
id = "*"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ api = "0.8"
[buildpack]
id = "multiple-buildpacks/not-libcnb"
version = "0.0.0"

[[stacks]]
id = "some-stack"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ api = "0.8"
[buildpack]
id = "multiple-buildpacks/one"
version = "0.0.0"

[[stacks]]
id = "some-stack"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ api = "0.8"
[buildpack]
id = "multiple-buildpacks/two"
version = "0.0.0"

[[stacks]]
id = "some-stack"
3 changes: 0 additions & 3 deletions libcnb-cargo/tests/fixtures/single_buildpack/buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ api = "0.10"
[buildpack]
id = "single-buildpack"
version = "0.0.0"

[[stacks]]
id = "some-stack"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ api = "0.8"
[buildpack]
id = "libcnb-test/compile-error"
version = "0.0.0"

[[stacks]]
id = "*"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ api = "0.8"
[buildpack]
id = "libcnb-test/a"
version = "0.0.0"

[[stacks]]
id = "*"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ api = "0.8"
[buildpack]
id = "libcnb-test/b"
version = "0.0.0"

[[stacks]]
id = "*"
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@ api = "0.8"
[buildpack]
id = "libcnb-test/invalid-cargo-toml"
version = "0.0.0"

[[stacks]]
id = "*"
5 changes: 1 addition & 4 deletions test-buildpacks/readonly-layer-files/buildpack.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
api = "0.9"
api = "0.10"

[buildpack]
id = "libcnb-test-buildpacks/readonly-layer-files"
version = "0.1.0"
name = "libcnb test buildpack: readonly-layer-files"

[[stacks]]
id = "*"
5 changes: 1 addition & 4 deletions test-buildpacks/sbom/buildpack.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
api = "0.9"
api = "0.10"

[buildpack]
id = "libcnb-test-buildpacks/sbom"
version = "0.1.0"
name = "libcnb test buildpack: SBOM"
sbom-formats = ["application/vnd.cyclonedx+json", "application/spdx+json", "application/vnd.syft+json"]

[[stacks]]
id = "*"
5 changes: 1 addition & 4 deletions test-buildpacks/store/buildpack.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
api = "0.9"
api = "0.10"

[buildpack]
id = "libcnb-test-buildpacks/store"
version = "0.1.0"
name = "libcnb test buildpack: store"

[[stacks]]
id = "*"
5 changes: 1 addition & 4 deletions test-buildpacks/tracing/buildpack.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
api = "0.9"
api = "0.10"

[buildpack]
id = "libcnb-test-buildpacks/tracing"
version = "0.1.0"
name = "libcnb test buildpack: tracing"

[[stacks]]
id = "*"
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
api = "0.9"
api = "0.10"

[buildpack]
id = "libcnb-test-buildpacks/tracing-reader"
version = "0.1.0"
name = "libcnb test buildpack fixture: tracing-reader"

[[stacks]]
id = "*"

0 comments on commit c62d083

Please sign in to comment.