Skip to content

Commit

Permalink
Correct ContextTarget references to distro image label names (#811)
Browse files Browse the repository at this point in the history
Since the relevant distros run image Docker label names are
`io.buildpacks.base.distro.name` and `io.buildpacks.base.distro.version`. 

See:
https://github.com/buildpacks/spec/blob/buildpack/v0.10/platform.md#target-data

I believe the rustdocs here were based on the `lifecycle` codebase,
which uses the wrong label name, and is about to be fixed:
buildpacks/lifecycle#1325
  • Loading branch information
edmorley authored Mar 28, 2024
1 parent 4d198b8 commit 0764388
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `libcnb`:
- `WriteLayerError` changed to contain more specific error enums instead of generic ones. ([#786](https://github.com/heroku/libcnb.rs/pull/786))

### Fixed

- `libcnb`
- Fixed the Docker label names mentioned in the rustdocs for `ContextTarget`'s `distro_name` and `distro_version`. ([#811](https://github.com/heroku/libcnb.rs/pull/811))

## [0.19.0] - 2024-02-23

### Added
Expand Down
4 changes: 2 additions & 2 deletions libcnb/src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ pub struct ContextTarget {
///
/// For example: `ubuntu` or `alpine`.
///
/// CNB `lifecycle` sources this value from the build OCI image's `io.buildpacks.distro.name` label.
/// CNB `lifecycle` sources this value from the build OCI image's `io.buildpacks.base.distro.name` label.
pub distro_name: Option<String>,
/// The version of the operating system distribution.
///
/// For example: `18.02` or `3.19`.
///
/// CNB `lifecycle` sources this value from the build OCI image's `io.buildpacks.distro.version` label.
/// CNB `lifecycle` sources this value from the build OCI image's `io.buildpacks.base.distro.version` label.
pub distro_version: Option<String>,
}

0 comments on commit 0764388

Please sign in to comment.