mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-18 18:49:50 +02:00
feat: prepare and cleanup release event hooks (#349)
Resolves #295 Resolves #330 Resolves #329 (Supports templating of only `releases[].hooks[].command` and `args` right now Resolves #324
This commit is contained in:
+4
-1
@@ -15,10 +15,13 @@ type Runner interface {
|
||||
}
|
||||
|
||||
// ShellRunner implemention for shell commands
|
||||
type ShellRunner struct{}
|
||||
type ShellRunner struct {
|
||||
Dir string
|
||||
}
|
||||
|
||||
// Execute a shell command
|
||||
func (shell ShellRunner) Execute(cmd string, args []string) ([]byte, error) {
|
||||
preparedCmd := exec.Command(cmd, args...)
|
||||
preparedCmd.Dir = shell.Dir
|
||||
return preparedCmd.CombinedOutput()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user