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

Feat: minimal dep on containerd #312

Merged
merged 15 commits into from
Sep 20, 2021
Merged
Prev Previous commit
Next Next commit
PR: removing branching logic in push.go
(confirmed tested that --dry-run still works)

Signed-off-by: Julius Liu <juliusl@microsoft.com>
  • Loading branch information
juliusl committed Sep 20, 2021
commit 179634ecec01bcdb0019c414fe9735e8ff165d87
13 changes: 4 additions & 9 deletions cmd/oras/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,12 @@ func runPush(opts pushOptions) error {
// bake artifact
var pushOpts []oras.PushOpt
if opts.artifactType != "" {
refResolver := resolver
if iresolver.IsDummy(resolver) {
refResolver, _ = newResolver(opts.username, opts.password, opts.insecure, opts.plainHTTP, opts.configs...)
} else {
resolver, err = orasDocker.WithDiscover(opts.artifactRefs, resolver, orasDocker.NewOpts(ropts))
if err != nil {
return err
}
resolver, err = orasDocker.WithDiscover(opts.artifactRefs, resolver, orasDocker.NewOpts(ropts))
if err != nil {
return err
}

manifest, err := loadReference(ctx, refResolver, opts.artifactRefs)
manifest, err := loadReference(ctx, resolver, opts.artifactRefs)
if err != nil {
return err
}
Expand Down