Documentation
¶
Index ¶
- Variables
- type Bazel
- func (g *Bazel) AddFlags(fs *flag.FlagSet)
- func (g *Bazel) Build(ctx context.Context, targets ...string) *exec.Cmd
- func (g *Bazel) BuildE(ctx context.Context, log logr.Logger, targets ...string) error
- func (g *Bazel) BuildPlatform(ctx context.Context, os, arch string, targets ...string) *exec.Cmd
- func (g *Bazel) BuildPlatformE(ctx context.Context, log logr.Logger, os, arch string, targets ...string) error
- func (g *Bazel) Cmd(ctx context.Context, args ...string) *exec.Cmd
- func (g *Bazel) Complete() error
- func (g *Bazel) Run(ctx context.Context, target string, args ...string) *exec.Cmd
- func (g *Bazel) RunE(ctx context.Context, log logr.Logger, target string, args ...string) error
- func (g *Bazel) RunPlatform(ctx context.Context, os, arch, target string, args ...string) *exec.Cmd
- func (g *Bazel) RunPlatformE(ctx context.Context, log logr.Logger, os, arch, target string, args ...string) error
- func (g *Bazel) Validate() []error
Constants ¶
This section is empty.
Variables ¶
var (
Default = &Bazel{}
)
Functions ¶
This section is empty.
Types ¶
type Bazel ¶
type Bazel struct {
// contains filtered or unexported fields
}
func (*Bazel) Build ¶
Build will construct a new exec.Cmd that will build the given targets. It will produce artifacts suitable for running on the current host OS. The --platforms flag *will not* be set.
func (*Bazel) BuildE ¶
BuildE will build the given targets for the current host OS. The --platforms flag *will not* be set.
func (*Bazel) BuildPlatform ¶
BuildPlatform will construct a new exec.Cmd that will build the given targets for the provided os and architecture. This is useful when producing cross-builds. Bazel's --platforms variable will be set automatically.
func (*Bazel) BuildPlatformE ¶
func (g *Bazel) BuildPlatformE(ctx context.Context, log logr.Logger, os, arch string, targets ...string) error
BuildPlatformE will build the given targets for the provided os and architecture. This is useful when producing cross-builds. Bazel's --platforms variable will be set automatically.
func (*Bazel) Run ¶
Run will construct a new exec.Cmd that will run the given targets It will produce artifacts suitable for running on the current host OS. The --platforms flag *will not* be set.
func (*Bazel) RunE ¶
RunE will run the given targets on the current host OS. The --platforms flag *will not* be set.
func (*Bazel) RunPlatform ¶
RunPlatform will construct a new exec.Cmd that will build the given target for the provided os and architecture. This is useful when producing cross-builds. Bazel's --platforms variable will be set automatically.
func (*Bazel) RunPlatformE ¶
func (g *Bazel) RunPlatformE(ctx context.Context, log logr.Logger, os, arch, target string, args ...string) error
RunPlatformE will run the given target, built for the provided os and architecture. This is useful when producing cross-builds. Bazel's --platforms variable will be set automatically.