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

chore: Remove last deprecated method #1438

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
33 changes: 0 additions & 33 deletions cmd/oras/internal/display/status/deprecated.go

This file was deleted.

7 changes: 5 additions & 2 deletions cmd/oras/root/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ import (
"oras.land/oras-go/v2/registry/remote/auth"
"oras.land/oras/cmd/oras/internal/argument"
"oras.land/oras/cmd/oras/internal/command"
"oras.land/oras/cmd/oras/internal/display/status"
"oras.land/oras/cmd/oras/internal/display/metadata/text"
"oras.land/oras/cmd/oras/internal/display/status/track"
oerrors "oras.land/oras/cmd/oras/internal/errors"
"oras.land/oras/cmd/oras/internal/option"
"oras.land/oras/cmd/oras/internal/output"
"oras.land/oras/internal/docker"
"oras.land/oras/internal/graph"
"oras.land/oras/internal/listener"
"oras.land/oras/internal/registryutil"
)

Expand Down Expand Up @@ -141,7 +142,9 @@ func runCopy(cmd *cobra.Command, opts *copyOptions) error {
if len(opts.extraRefs) != 0 {
tagNOpts := oras.DefaultTagNOptions
tagNOpts.Concurrency = opts.concurrency
if _, err = oras.TagN(ctx, status.NewTagStatusPrinter(opts.Printer, dst), opts.To.Reference, opts.extraRefs, tagNOpts); err != nil {
tagHandler := text.NewTagHandler(opts.Printer, "")
tagListener := listener.NewTagListener(dst, nil, tagHandler.OnTagged)
if _, err = oras.TagN(ctx, tagListener, opts.To.Reference, opts.extraRefs, tagNOpts); err != nil {
return err
}
}
Expand Down
7 changes: 5 additions & 2 deletions cmd/oras/root/manifest/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@
"oras.land/oras-go/v2/registry/remote"
"oras.land/oras/cmd/oras/internal/argument"
"oras.land/oras/cmd/oras/internal/command"
"oras.land/oras/cmd/oras/internal/display/status"
"oras.land/oras/cmd/oras/internal/display/metadata/text"
oerrors "oras.land/oras/cmd/oras/internal/errors"
"oras.land/oras/cmd/oras/internal/manifest"
"oras.land/oras/cmd/oras/internal/option"
"oras.land/oras/internal/file"
"oras.land/oras/internal/listener"
)

type pushOptions struct {
Expand Down Expand Up @@ -189,7 +190,9 @@
}
_ = opts.Println("Pushed", opts.AnnotatedReference())
if len(opts.extraRefs) != 0 {
if _, err = oras.TagBytesN(ctx, status.NewTagStatusPrinter(opts.Printer, target), mediaType, contentBytes, opts.extraRefs, tagBytesNOpts); err != nil {
tagHandler := text.NewTagHandler(opts.Printer, "")
tagListener := listener.NewTagListener(target, nil, tagHandler.OnTagged)
if _, err = oras.TagBytesN(ctx, tagListener, mediaType, contentBytes, opts.extraRefs, tagBytesNOpts); err != nil {

Check warning on line 195 in cmd/oras/root/manifest/push.go

View check run for this annotation

Codecov / codecov/patch

cmd/oras/root/manifest/push.go#L193-L195

Added lines #L193 - L195 were not covered by tests
return err
}
}
Expand Down
Loading