Skip to content
Closed
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
14 changes: 14 additions & 0 deletions pkg/cli/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ type NameSpaceResults struct {
UTS string
}

// PodmanBuildResults represents the results for Podman Build flags

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just add this to Podman?
libpod/cmd/build.go?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably. All the other definitions are here, so thought I'd keep them together. I'll try adding it to cmd/build.go.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per @rhatdan's suggestion, I've moved this code into Podman in podman-container-tools/podman#4215. If those changes are merged there, I will close this PR.

// that are unique to Podman
type PodmanBuildResults struct {
SquashAll bool
}

// BudResults represents the results for Bud flags
type BudResults struct {
Annotation []string
Expand Down Expand Up @@ -137,6 +143,14 @@ func GetLayerFlags(flags *LayerResults) pflag.FlagSet {
return fs
}

// GetPodmanBuildFlags flags used only by `podman build` and not by
// `buildah bud`.
func GetPodmanBuildFlags(flags *PodmanBuildResults) pflag.FlagSet {
fs := pflag.FlagSet{}
fs.BoolVar(&flags.SquashAll, "squash-all", false, "Squash all layers into a single layer.")
return fs
}

// GetBudFlags returns common bud flags
func GetBudFlags(flags *BudResults) pflag.FlagSet {
fs := pflag.FlagSet{}
Expand Down