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:
KUOKA Yusuke
2018-09-21 10:35:12 +09:00
committed by GitHub
parent 4da13b44ee
commit b9de22b256
7 changed files with 433 additions and 4 deletions
+4 -1
View File
@@ -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()
}