Skip to content

Commit 5c10c7e

Browse files
wangxiaoxuan273Terry Howe
authored and
Terry Howe
committed
bump: change oras-go version to rc6 and change concurrency type (oras-project#715)
To accommodate the latest breaking change in oras-go rc6. Resolves oras-project#719 Signed-off-by: wangxiaoxuan273 <wangxiaoxuan119@gmail.com>
1 parent 158d311 commit 5c10c7e

File tree

8 files changed

+18
-18
lines changed

8 files changed

+18
-18
lines changed

cmd/oras/attach.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type attachOptions struct {
3636

3737
targetRef string
3838
artifactType string
39-
concurrency int64
39+
concurrency int
4040
}
4141

4242
func attachCmd() *cobra.Command {
@@ -75,7 +75,7 @@ Example - Attach file 'hi.txt' and export the pushed manifest to 'manifest.json'
7575
}
7676

7777
cmd.Flags().StringVarP(&opts.artifactType, "artifact-type", "", "", "artifact type")
78-
cmd.Flags().Int64VarP(&opts.concurrency, "concurrency", "", 5, "concurrency level")
78+
cmd.Flags().IntVarP(&opts.concurrency, "concurrency", "", 5, "concurrency level")
7979
cmd.MarkFlagRequired("artifact-type")
8080
option.ApplyFlags(&opts, cmd.Flags())
8181
return cmd

cmd/oras/cp.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type copyOptions struct {
3636
option.Platform
3737
recursive bool
3838

39-
concurrency int64
39+
concurrency int
4040
srcRef string
4141
dstRef string
4242
extraRefs []string
@@ -80,7 +80,7 @@ Example - Copy the artifact tagged with 'v1' from repository 'localhost:5000/net
8080
cmd.Flags().BoolVarP(&opts.recursive, "recursive", "r", false, "recursively copy the artifact and its referrer artifacts")
8181
opts.src.ApplyFlagsWithPrefix(cmd.Flags(), "from", "source")
8282
opts.dst.ApplyFlagsWithPrefix(cmd.Flags(), "to", "destination")
83-
cmd.Flags().Int64VarP(&opts.concurrency, "concurrency", "", 3, "concurrency level")
83+
cmd.Flags().IntVarP(&opts.concurrency, "concurrency", "", 3, "concurrency level")
8484
option.ApplyFlags(&opts, cmd.Flags())
8585

8686
return cmd

cmd/oras/manifest/push.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type pushOptions struct {
3939
option.Pretty
4040
option.Remote
4141

42-
concurrency int64
42+
concurrency int
4343
targetRef string
4444
extraRefs []string
4545
fileRef string
@@ -94,7 +94,7 @@ Example - Push a manifest to repository 'locahost:5000/hello' and tag with 'tag1
9494

9595
option.ApplyFlags(&opts, cmd.Flags())
9696
cmd.Flags().StringVarP(&opts.mediaType, "media-type", "", "", "media type of manifest")
97-
cmd.Flags().Int64VarP(&opts.concurrency, "concurrency", "", 5, "concurrency level")
97+
cmd.Flags().IntVarP(&opts.concurrency, "concurrency", "", 5, "concurrency level")
9898
return cmd
9999
}
100100

cmd/oras/pull.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type pullOptions struct {
3838
option.Remote
3939
option.Platform
4040

41-
concurrency int64
41+
concurrency int
4242
targetRef string
4343
KeepOldFiles bool
4444
PathTraversal bool
@@ -86,7 +86,7 @@ Example - Pull all files with concurrency level tuned:
8686
cmd.Flags().BoolVarP(&opts.PathTraversal, "allow-path-traversal", "T", false, "allow storing files out of the output directory")
8787
cmd.Flags().StringVarP(&opts.Output, "output", "o", ".", "output directory")
8888
cmd.Flags().StringVarP(&opts.ManifestConfigRef, "config", "", "", "output manifest config file")
89-
cmd.Flags().Int64VarP(&opts.concurrency, "concurrency", "", 3, "concurrency level")
89+
cmd.Flags().IntVarP(&opts.concurrency, "concurrency", "", 3, "concurrency level")
9090
option.ApplyFlags(&opts, cmd.Flags())
9191
return cmd
9292
}

cmd/oras/push.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ type pushOptions struct {
4444
extraRefs []string
4545
manifestConfigRef string
4646
artifactType string
47-
concurrency int64
47+
concurrency int
4848
}
4949

5050
func pushCmd() *cobra.Command {
@@ -107,7 +107,7 @@ Example - Push file "hi.txt" with multiple tags and concurrency level tuned:
107107
}
108108
cmd.Flags().StringVarP(&opts.manifestConfigRef, "config", "", "", "`path` of image config file")
109109
cmd.Flags().StringVarP(&opts.artifactType, "artifact-type", "", "", "artifact type")
110-
cmd.Flags().Int64VarP(&opts.concurrency, "concurrency", "", 5, "concurrency level")
110+
cmd.Flags().IntVarP(&opts.concurrency, "concurrency", "", 5, "concurrency level")
111111

112112
option.ApplyFlags(&opts, cmd.Flags())
113113
return cmd

cmd/oras/tag/tag.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ type tagOptions struct {
2727
option.Common
2828
option.Remote
2929

30-
concurrency int64
30+
concurrency int
3131
srcRef string
3232
targetRefs []string
3333
}
@@ -65,7 +65,7 @@ Example - Tag the manifest 'v1.0.1' in 'localhost:5000/hello' to 'v1.0.1', 'v1.0
6565
}
6666

6767
option.ApplyFlags(&opts, cmd.Flags())
68-
cmd.Flags().Int64VarP(&opts.concurrency, "concurrency", "", 5, "concurrency level")
68+
cmd.Flags().IntVarP(&opts.concurrency, "concurrency", "", 5, "concurrency level")
6969
return cmd
7070
}
7171

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ require (
1111
github.com/sirupsen/logrus v1.9.0
1212
github.com/spf13/cobra v1.6.1
1313
github.com/spf13/pflag v1.0.5
14-
oras.land/oras-go/v2 v2.0.0-rc.4.0.20221111045309-74eeb52579de
14+
oras.land/oras-go/v2 v2.0.0-rc.6
1515
)
1616

1717
require (
@@ -20,6 +20,6 @@ require (
2020
github.com/docker/docker-credential-helpers v0.6.4 // indirect
2121
github.com/inconshreveable/mousetrap v1.0.1 // indirect
2222
github.com/pkg/errors v0.9.1 // indirect
23-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
23+
golang.org/x/sync v0.1.0 // indirect
2424
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
2525
)

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
4646
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
4747
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
4848
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
49-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
50-
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
49+
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
50+
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
5151
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
5252
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
5353
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -63,5 +63,5 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
6363
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
6464
gotest.tools/v3 v3.0.2 h1:kG1BFyqVHuQoVQiR1bWGnfz/fmHvvuiSPIV7rvl360E=
6565
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
66-
oras.land/oras-go/v2 v2.0.0-rc.4.0.20221111045309-74eeb52579de h1:wd4FNQUAyeKAsL28thn32k+vvAMlYN/a+rdKqsyB9Cs=
67-
oras.land/oras-go/v2 v2.0.0-rc.4.0.20221111045309-74eeb52579de/go.mod h1:YGHvWBGuqRlZgUyXUIoKsR3lcuCOb3DAtG0SEsEw1iY=
66+
oras.land/oras-go/v2 v2.0.0-rc.6 h1:jGWysqm8flq+X0Vj8bZ6rkASAqTab5k18Mx9hEjFc8g=
67+
oras.land/oras-go/v2 v2.0.0-rc.6/go.mod h1:iVExH1NxrccIxjsiq17L91WCZ4KIw6jVQyCLsZsu1gc=

0 commit comments

Comments
 (0)