| Revision 9983, 822 bytes checked in by iwaim, 11 years ago (diff) |
|---|
diff --git a/build/make.go b/build/make.go index c094249..ac8936b 100644
| a | b | func main() { |
|---|---|---|
| 59 | 59 | case "build": |
| 60 | 60 | setupDeps() |
| 61 | 61 | buildBinaries() |
| 62 | case "build-single": | |
| 63 | setupPecoInGopath() | |
| 64 | buildSingleBinary() | |
| 62 | 65 | default: |
| 63 | 66 | panic("Unknown action: " + action) |
| 64 | 67 | } |
| … | … | func buildBinaryFor(osname, arch string) { |
| 201 | 204 | run("mv", file, filepath.Join(getBuildDir(), "artifacts")) |
| 202 | 205 | } |
| 203 | 206 | |
| 207 | func buildSingleBinary() { | |
| 208 | buildDir := getBuildDir() | |
| 209 | var goPath = fmt.Sprintf("%s:%s", buildDir, os.Getenv("GOPATH")) | |
| 210 | os.Setenv("GOPATH", goPath) | |
| 211 | ||
| 212 | run("go", "build", "-o", | |
| 213 | filepath.Join("peco", "peco"), | |
| 214 | filepath.Join("cmd", "peco", "peco.go"), | |
| 215 | ) | |
| 216 | } | |
| 217 | ||
| 204 | 218 | func run(name string, args ...string) error { |
| 205 | 219 | splat := []string{name} |
| 206 | 220 | splat = append(splat, args...) |