diff options
author | Steve <nilslice@gmail.com> | 2017-02-21 18:30:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-21 18:30:29 -0800 |
commit | e295f961e3e6e9add75086ab75cf90959cc890f5 (patch) | |
tree | ac97e9bc8d359f4287bfd1dfabfe9014f43c23a9 /cmd/ponzu/paths.go | |
parent | 39e0708be1b57b5527f4c79708b25067ba50f86e (diff) | |
parent | c0448ebb1157210ae7d36ddf6f49e4c44f914dd5 (diff) |
Merge pull request #79 from ponzu-cms/ponzu-dev
[core] Windows build & run support
Diffstat (limited to 'cmd/ponzu/paths.go')
-rw-r--r-- | cmd/ponzu/paths.go | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/cmd/ponzu/paths.go b/cmd/ponzu/paths.go new file mode 100644 index 0000000..73d8d73 --- /dev/null +++ b/cmd/ponzu/paths.go @@ -0,0 +1,24 @@ +package main + +import "runtime" + +// buildOutputName returns the correct ponzu-server file name +// based on the host Operating System +func buildOutputName() string { + if runtime.GOOS == "windows" { + return "ponzu-server.exe" + } + + return "ponzu-server" +} + +// buildOutputPath returns the correct path to the ponzu-server binary +// built, based on the host Operating System. This is necessary so that +// the UNIX-y systems know to look in the current directory, and not the $PATH +func buildOutputPath() string { + if runtime.GOOS == "windows" { + return "" + } + + return "." +} |