Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runner.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ root: .
tmp_path: ./tmp
build_name: runner-build
build_log: runner-build-errors.log
run_flags: --test1=test1, --test2=test2
valid_ext: .go, .tpl, .tmpl, .html
no_rebuild_ext: .tpl, .tmpl, .html
ignored: assets, tmp
Expand Down
2 changes: 1 addition & 1 deletion runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
func run() bool {
runnerLog("Running...")

cmd := exec.Command(buildPath())
cmd := exec.Command(buildPath(), runFlags()...)

stderr, err := cmd.StderrPipe()
if err != nil {
Expand Down
6 changes: 6 additions & 0 deletions runner/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
const (
envSettingsPrefix = "RUNNER_"
mainSettingsSection = "Settings"
runFlagsDelimeter = ", "
)

var settings = map[string]string{
Expand All @@ -23,6 +24,7 @@ var settings = map[string]string{
"tmp_path": "./tmp",
"build_name": "runner-build",
"build_log": "runner-build-errors.log",
"run_flags": "",
"valid_ext": ".go, .tpl, .tmpl, .html",
"no_rebuild_ext": ".tpl, .tmpl, .html",
"ignored": "assets, tmp",
Expand Down Expand Up @@ -131,6 +133,10 @@ func buildErrorsFileName() string {
return settings["build_log"]
}

func runFlags() []string {
return strings.Split(settings["run_flags"], runFlagsDelimeter)
}

func buildErrorsFilePath() string {
return filepath.Join(tmpPath(), buildErrorsFileName())
}
Expand Down