Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update changelog and rustdocs for BuildpackReference changes #677

Merged
merged 1 commit into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `ExecDProgramOutputKey`, `ProcessType`, `LayerName`, `BuildpackId` and `StackId` now implement `Ord` and `PartialOrd`. ([#658](https://github.com/heroku/libcnb.rs/pull/658))
- Add `generic::GenericMetadata` as a generic metadata type. Also makes it the default for `BuildpackDescriptor`, `SingleBuildpackDescriptor`, `MetaBuildpackDescriptor` and `LayerContentMetadata`. ([#664](https://github.com/heroku/libcnb.rs/pull/664))
- `libcnb-test`:
- Added the variant `WorkspaceBuildpack` to the `build_config::BuildpackReference` enum which allows any buildpack within the Rust workspace to be referenced for testing. ([#666](https://github.com/heroku/libcnb.rs/pull/666))
- Testing of composite buildpacks is now supported using the `WorkspaceBuildpack` variant - **Requires `pack` CLI version `>=0.30`**. ([#666](https://github.com/heroku/libcnb.rs/pull/666))
- Added the `BuildpackReference::WorkspaceBuildpack` enum variant. This allows for the testing of any libcnb.rs or composite buildpack in the Cargo workspace, instead of only the buildpack of the current crate. **Note: The testing of composite buildpacks requires `pack` CLI version `>=0.30`.** ([#666](https://github.com/heroku/libcnb.rs/pull/666))

### Changed

Expand All @@ -26,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Build output for humans changed slightly, output intended for machines/scripting didn't change. ([#657](https://github.com/heroku/libcnb.rs/pull/657))
- When performing buildpack detection, standard ignore files (`.ignore` and `.gitignore`) will be respected. ([#673](https://github.com/heroku/libcnb.rs/pull/673))
- `libcnb-test`:
- Renamed the variant `Crate` to `CurrentCrate` for the `build_config::BuildpackReference` enum which references the buildpack within the Rust Crate currently being tested. ([#666](https://github.com/heroku/libcnb.rs/pull/666))
- Renamed `BuildpackReference::Crate` to `BuildpackReference::CurrentCrate`. ([#666](https://github.com/heroku/libcnb.rs/pull/666))

## [0.14.0] - 2023-08-18

Expand Down
8 changes: 6 additions & 2 deletions libcnb-test/src/build_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ impl BuildConfig {
///
/// # Example
/// ```no_run
/// use libcnb::data::buildpack_id;
/// use libcnb_test::{BuildConfig, BuildpackReference, TestRunner};
///
/// TestRunner::default().build(
/// BuildConfig::new("heroku/builder:22", "test-fixtures/app").buildpacks(vec![
/// BuildpackReference::Other(String::from("heroku/another-buildpack")),
/// BuildpackReference::CurrentCrate,
/// BuildpackReference::WorkspaceBuildpack(buildpack_id!("my-project/buildpack")),
/// BuildpackReference::Other(String::from("heroku/another-buildpack")),
/// ]),
/// |context| {
/// // ...
Expand Down Expand Up @@ -251,8 +253,10 @@ impl BuildConfig {
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum BuildpackReference {
/// References the buildpack in the Rust Crate currently being tested.
///
/// Is equivalent to `BuildpackReference::WorkspaceBuildpack(buildpack_id!("<buildpack ID of current crate"))`.
CurrentCrate,
/// References a libcnb.rs buildpack within the Rust Workspace that needs to be packaged into a buildpack
/// References a libcnb.rs or composite buildpack within the Cargo workspace that needs to be packaged into a buildpack.
WorkspaceBuildpack(BuildpackId),
/// References another buildpack by id, local directory or tarball.
Other(String),
Expand Down