diff options
author | Steve <nilslice@gmail.com> | 2016-12-28 16:23:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-28 16:23:44 -0800 |
commit | 806fdbe1e8839feb1bcc4e5e07aa7c144a429901 (patch) | |
tree | dacaed91abb57bc6891c1b2cb58a82fc0c9610fc /cmd/ponzu/options.go | |
parent | 1f7a5b46b906da00ceccb03e7ff26627bb29a3dd (diff) | |
parent | 5c340ca57e876a556a5b57e5a7dd32b0ae288440 (diff) |
Merge pull request #26 from ponzu-cms/ponzu-dev
[tooling] Add Go command flag, auto-generate self-signed SSL for development
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 |