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

remove build options #849

Merged
merged 1 commit into from
Aug 17, 2023
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
3 changes: 0 additions & 3 deletions internal/cli/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ func buildCmd() *cobra.Command {
var extraKeys []string
var extraRepos []string
var extraPackages []string
var buildOptions []string
var logPolicy []string
var rawAnnotations []string
var cacheDir string
Expand Down Expand Up @@ -118,7 +117,6 @@ bill of materials) describing the image contents.
build.WithDebugLogging(debugEnabled),
build.WithVCS(withVCS),
build.WithAnnotations(annotations),
build.WithBuildOptions(buildOptions),
build.WithCacheDir(cacheDir),
)
},
Expand All @@ -135,7 +133,6 @@ bill of materials) describing the image contents.
cmd.Flags().StringSliceVarP(&extraKeys, "keyring-append", "k", []string{}, "path to extra keys to include in the keyring")
cmd.Flags().StringSliceVar(&sbomFormats, "sbom-formats", sbom.DefaultOptions.Formats, "SBOM formats to output")
cmd.Flags().StringSliceVarP(&extraRepos, "repository-append", "r", []string{}, "path to extra repositories to include")
cmd.Flags().StringSliceVar(&buildOptions, "build-option", []string{}, "build options to enable")
cmd.Flags().StringSliceVarP(&extraPackages, "package-append", "p", []string{}, "extra packages to include")
_ = cmd.Flags().MarkDeprecated("build-option", "use --package-append instead")
cmd.Flags().StringSliceVar(&logPolicy, "log-policy", []string{}, "logging policy to use")
Expand Down
3 changes: 0 additions & 3 deletions internal/cli/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ func publish() *cobra.Command {
var extraKeys []string
var extraRepos []string
var extraPackages []string
var buildOptions []string
var rawAnnotations []string
var logPolicy []string
var debugEnabled bool
Expand Down Expand Up @@ -138,7 +137,6 @@ in a keychain.`,
build.WithDebugLogging(debugEnabled),
build.WithVCS(withVCS),
build.WithAnnotations(annotations),
build.WithBuildOptions(buildOptions),
build.WithCacheDir(cacheDir),
},
[]PublishOption{
Expand Down Expand Up @@ -170,7 +168,6 @@ in a keychain.`,
cmd.Flags().StringSliceVarP(&extraKeys, "keyring-append", "k", []string{}, "path to extra keys to include in the keyring")
cmd.Flags().StringSliceVar(&sbomFormats, "sbom-formats", sbom.DefaultOptions.Formats, "SBOM formats to output")
cmd.Flags().StringSliceVarP(&extraRepos, "repository-append", "r", []string{}, "path to extra repositories to include")
cmd.Flags().StringSliceVar(&buildOptions, "build-option", []string{}, "build options to enable")
cmd.Flags().StringSliceVarP(&extraPackages, "package-append", "p", []string{}, "extra packages to include")
_ = cmd.Flags().MarkDeprecated("build-option", "use --package-append instead")
cmd.Flags().StringSliceVar(&logPolicy, "log-policy", []string{}, "logging policy to use")
Expand Down
16 changes: 0 additions & 16 deletions pkg/build/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,19 +205,3 @@ func WithCacheDir(cacheDir string) Option {
return nil
}
}

// WithBuildOptions applies configured patches which have been requested to the ImageConfiguration.
// Deprecated: Use WithExtraPackages.
func WithBuildOptions(buildOptions []string) Option {
return func(bc *Context) error {
for _, opt := range buildOptions {
if bo, ok := bc.ic.Options[opt]; ok { //nolint:staticcheck
if err := bo.Apply(&bc.ic); err != nil {
return err
}
}
}

return nil
}
}
Loading