Create a Lint step [#3]
Still need global flags and checks for mandatory settings, but the basic functionality is there.
This commit is contained in:
28
internal/run/lint.go
Normal file
28
internal/run/lint.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package run
|
||||
|
||||
import (
|
||||
// "fmt"
|
||||
)
|
||||
|
||||
// Lint is an execution step that calls `helm lint` when executed.
|
||||
type Lint struct {
|
||||
Chart string
|
||||
|
||||
cmd cmd
|
||||
}
|
||||
|
||||
// Execute executes the `helm lint` command.
|
||||
func (l *Lint) Execute(_ Config) error {
|
||||
return l.cmd.Run()
|
||||
}
|
||||
|
||||
// Prepare gets the Lint ready to execute.
|
||||
func (l *Lint) Prepare(cfg Config) error {
|
||||
args := []string{"lint", l.Chart}
|
||||
|
||||
l.cmd = command(helmBin, args...)
|
||||
l.cmd.Stdout(cfg.Stdout)
|
||||
l.cmd.Stderr(cfg.Stderr)
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user