-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
… files
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,16 @@ import ( | |
"os" | ||
"os/exec" | ||
"path/filepath" | ||
"strings" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
func buildPonzuServer() error { | ||
pwd, err := os.Getwd() | ||
if err != nil { | ||
return err | ||
} | ||
|
||
// copy all ./content files to internal vendor directory | ||
src := "content" | ||
dst := filepath.Join("cmd", "ponzu", "vendor", "github.com", "ponzu-cms", "ponzu", "content") | ||
err = emptyDir(dst) | ||
err := emptyDir(dst) | ||
if err != nil { | ||
return err | ||
} | ||
|
@@ -36,18 +32,9 @@ func buildPonzuServer() error { | |
} | ||
|
||
// execute go build -o ponzu-cms cmd/ponzu/*.go | ||
buildOptions := []string{"build", "-o", buildOutputName()} | ||
cmdBuildFiles := []string{ | ||
"main.go", "options.go", "generate.go", | ||
"usage.go", "paths.go", "add.go", | ||
} | ||
var cmdBuildFilePaths []string | ||
for _, file := range cmdBuildFiles { | ||
p := filepath.Join(pwd, "cmd", "ponzu", file) | ||
cmdBuildFilePaths = append(cmdBuildFilePaths, p) | ||
} | ||
|
||
build := exec.Command(gocmd, append(buildOptions, cmdBuildFilePaths...)...) | ||
cmdPackageName := strings.Join([]string{".", "cmd", "ponzu"}, "/") | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
martint17r
Author
Contributor
|
||
buildOptions := []string{"build", "-o", buildOutputName(), cmdPackageName} | ||
build := exec.Command(gocmd, buildOptions...) | ||
build.Stderr = os.Stderr | ||
build.Stdout = os.Stdout | ||
|
||
|
I don't think is windows compatible now - look at filepath.Separator (I think its in that package)