File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 25
25
# - it either
26
26
# (a) makes changes to files within the repo, outputs a commit message to stdout, and exits with code 0
27
27
# (b) exits with a nonzero exit code
28
+
29
+ # Basepath to prepend temp directories. Not including this option is okay and the program will assume ""
30
+ base_path : " path/to/prepend/tmpdir"
28
31
change_cmds :
29
32
# command paths can either be absolute paths, or paths relative to the configuration file.
30
33
- path : " /path/to/the/program"
Original file line number Diff line number Diff line change 1
- 1.0.0
1
+ 1.0.1
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ func (c Command) Validate() error {
32
32
// Config for gitbot.
33
33
type Config struct {
34
34
Repos []string `yaml:"repos"`
35
+ BasePath string `yaml:"base_path"`
35
36
ChangeCmds []Command `yaml:"change_cmds"`
36
37
PostCmds []Command `yaml:"post_cmds"`
37
38
}
@@ -104,9 +105,11 @@ func main() {
104
105
log .Fatal (err )
105
106
}
106
107
108
+ base_path := cfg .BasePath
109
+
107
110
for _ , repo := range cfg .Repos {
108
111
// clone repo to temp directory
109
- tempdir , err := ioutil .TempDir (os .TempDir (), "" )
112
+ tempdir , err := ioutil .TempDir (base_path + os .TempDir (), "" )
110
113
if err != nil {
111
114
log .Fatal (err )
112
115
}
You can’t perform that action at this time.
0 commit comments