Skip to content

Commit

Permalink
add platform
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
  • Loading branch information
qweeah committed Jan 25, 2024
1 parent 06f8da3 commit 58446a5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/oras/internal/meta/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,12 @@ func ToDescriptor(name string, desc ocispec.Descriptor) Descriptor {
Data: desc.Data,
ArtifactType: desc.ArtifactType,
}
if desc.Platform != nil {
ret.Platform = &Platform{
Architecture: desc.Platform.Architecture,
OS: desc.Platform.OS,
Variant: desc.Platform.Variant,
}
}
return ret
}

0 comments on commit 58446a5

Please sign in to comment.