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: make image spec preview #1338

Merged
merged 2 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
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
Loading