Skip to content

Commit

Permalink
Merge pull request #849 from imjasonh/no-build-options
Browse files Browse the repository at this point in the history
remove build options
  • Loading branch information
imjasonh authored Aug 17, 2023
2 parents b78ef08 + 151ecc9 commit 2981437
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
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
}
}

0 comments on commit 2981437

Please sign in to comment.