Skip to content

Commit 5aa0548

Browse files
committed
Add OSVersion to platform protobuf
It also extends the functions in api/types/platform_helpers.go Signed-off-by: kiashok <[email protected]>
1 parent d9cae66 commit 5aa0548

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

api/next.pb.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,13 @@ file {
881881
type: TYPE_STRING
882882
json_name: "variant"
883883
}
884+
field {
885+
name: "os_version"
886+
number: 4
887+
label: LABEL_OPTIONAL
888+
type: TYPE_STRING
889+
json_name: "osVersion"
890+
}
884891
}
885892
options {
886893
go_package: "github.com/containerd/containerd/v2/api/types;types"

api/types/platform.pb.go

Lines changed: 16 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/types/platform.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@ message Platform {
2626
string os = 1;
2727
string architecture = 2;
2828
string variant = 3;
29+
string os_version = 4;
2930
}

api/types/platform_helpers.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ func OCIPlatformToProto(platforms []oci.Platform) []*Platform {
2525
for i := range platforms {
2626
ap[i] = &Platform{
2727
OS: platforms[i].OS,
28+
OSVersion: platforms[i].OSVersion,
2829
Architecture: platforms[i].Architecture,
2930
Variant: platforms[i].Variant,
3031
}
@@ -39,6 +40,7 @@ func OCIPlatformFromProto(platforms []*Platform) []oci.Platform {
3940
for i := range platforms {
4041
op[i] = oci.Platform{
4142
OS: platforms[i].OS,
43+
OSVersion: platforms[i].OSVersion,
4244
Architecture: platforms[i].Architecture,
4345
Variant: platforms[i].Variant,
4446
}

0 commit comments

Comments
 (0)