support commands with arguments
Arguments would simply be provided like?
"commands": [
"/home/bar/deploy.sh -t",
"/home/bar/cleanup.sh --speed -t --retry-once"
]
It's not working that way because exec.Command's first parameter is the executable, the rest are the parameters. You'll get an error that it can't be executed.
Ok, so can you give an example how to provide the arguments?
Using @oker1 fork following command works
gitlab-webhook | 2016/03/22 10:47:12 Executed: /usr/bin/git --git-dir=/repos/my_repo/.git pull origin master
whereas using @soupdiver master I have following error
gitlab-webhook | 2016/03/22 10:45:32 fork/exec /usr/bin/git --git-dir=/repos/my_repo/.git pull origin master: no such file or directory
@kakawait @oker1 I'm willing to merge the PR but please also update https://github.com/soupdiver/go-gitlab-webhook/blob/master/config.example.json so that there is an example on how to provide the arguments properly.
You don't have to change the config, the command is split up at spaces.
Yes config.json from my previous sample is strictly the same!