diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-12-26 09:30:54 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-12-26 09:30:54 -0800 |
commit | 0ae6aca32f143fb73e934e5c777c564365289e1f (patch) | |
tree | 40a20b06bb07423377218dfa3f4788855c97bbc1 /cmd/ponzu/options.go | |
parent | 012a0c12e85411777b6c6d9444081e1f6156757d (diff) |
adding gocmd flag to more easily test against go1.8beta2 and future builds
Diffstat (limited to 'cmd/ponzu/options.go')
-rw-r--r-- | cmd/ponzu/options.go | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/cmd/ponzu/options.go b/cmd/ponzu/options.go index 7e37255..1316a67 100644 --- a/cmd/ponzu/options.go +++ b/cmd/ponzu/options.go @@ -271,10 +271,17 @@ func buildPonzuServer(args []string) error { } // execute go build -o ponzu-cms cmd/ponzu/*.go - mainPath := filepath.Join(pwd, "cmd", "ponzu", "main.go") - optsPath := filepath.Join(pwd, "cmd", "ponzu", "options.go") - genPath := filepath.Join(pwd, "cmd", "ponzu", "generate.go") - build := exec.Command("go", "build", "-o", "ponzu-server", mainPath, optsPath, genPath) + buildOptions := []string{"build", "-o", "ponzu-server"} + cmdBuildFiles := []string{"main.go", "options.go", "generate.go", "usage.go"} + var cmdBuildFilePaths []string + for _, file := range cmdBuildFiles { + p := filepath.Join(pwd, "cmd", "ponzu", file) + cmdBuildFilePaths = append(cmdBuildFilePaths, p) + } + // mainPath := filepath.Join(pwd, "cmd", "ponzu", "main.go") + // optsPath := filepath.Join(pwd, "cmd", "ponzu", "options.go") + // genPath := filepath.Join(pwd, "cmd", "ponzu", "generate.go") + build := exec.Command(gocmd, append(buildOptions, cmdBuildFilePaths...)...) build.Stderr = os.Stderr build.Stdout = os.Stdout |