Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support build with args #106

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
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(), buildArgs())

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 @@ -22,6 +22,7 @@ var settings = map[string]string{
"root": ".",
"tmp_path": "./tmp",
"build_name": "runner-build",
"build_args": "",
"build_log": "runner-build-errors.log",
"valid_ext": ".go, .tpl, .tmpl, .html",
"no_rebuild_ext": ".tpl, .tmpl, .html",
Expand Down Expand Up @@ -119,6 +120,7 @@ func tmpPath() string {
func buildName() string {
return settings["build_name"]
}

func buildPath() string {
p := filepath.Join(tmpPath(), buildName())
if runtime.GOOS == "windows" && filepath.Ext(p) != ".exe" {
Expand All @@ -127,6 +129,10 @@ func buildPath() string {
return p
}

func buildArgs() string {
return settings["build_args"]
}

func buildErrorsFileName() string {
return settings["build_log"]
}
Expand Down