Skip to content

Commit

Permalink
feat: make image spec preview (oras-project#1338)
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxuan Wang <[email protected]>
  • Loading branch information
wangxiaoxuan273 authored and FeynmanZhou committed May 11, 2024
1 parent 0291003 commit 0644274
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/oras/internal/option/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (is *ImageSpec) ApplyFlags(fs *pflag.FlagSet) {
// default to v1.1, unless --config is used and --artifact-type is not used
is.PackVersion = oras.PackManifestVersion1_1
is.Flag = ImageSpecV1_1
fs.Var(is, "image-spec", `[Experimental] specify manifest type for building artifact. Options: v1.1, v1.0 (default v1.1, overridden to v1.0 if --config is used without --artifact-type)`)
fs.Var(is, "image-spec", `[Preview] specify manifest type for building artifact. Options: v1.1, v1.0 (default v1.1, overridden to v1.0 if --config is used without --artifact-type)`)
}

// DistributionSpec option struct which implements pflag.Value interface.
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/suite/command/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var _ = Describe("ORAS beginners:", func() {
When("running push command", func() {
It("should show help description with feature flags", func() {
out := ORAS("push", "--help").MatchKeyWords(ExampleDesc).Exec().Out
gomega.Expect(out).Should(gbytes.Say("--image-spec string\\s+%s", regexp.QuoteMeta(feature.Experimental.Mark)))
gomega.Expect(out).Should(gbytes.Say("--image-spec string\\s+%s", regexp.QuoteMeta(feature.Preview.Mark)))
})

It("should fail and show detailed error description if no argument provided", func() {
Expand Down

0 comments on commit 0644274

Please sign in to comment.