From 076438871d8bc415227613e14988f5b1cde4e2b8 Mon Sep 17 00:00:00 2001 From: Ed Morley <501702+edmorley@users.noreply.github.com> Date: Thu, 28 Mar 2024 13:40:43 +0000 Subject: [PATCH] Correct `ContextTarget` references to distro image label names (#811) 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: https://github.com/buildpacks/lifecycle/pull/1325 --- CHANGELOG.md | 5 +++++ libcnb/src/target.rs | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98a5062a..f23171d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/libcnb/src/target.rs b/libcnb/src/target.rs index c667a174..80aede23 100644 --- a/libcnb/src/target.rs +++ b/libcnb/src/target.rs @@ -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, /// 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, }