source: projects/specs/trunk/p/peco/peco-0.3.5_make.patch @ 9983

Revision 9983, 822 bytes checked in by iwaim, 8 years ago (diff)

peco 0.3.5-1

RevLine 
[9983]1diff --git a/build/make.go b/build/make.go
2index c094249..ac8936b 100644
3--- a/build/make.go
4+++ b/build/make.go
5@@ -59,6 +59,9 @@ func main() {
6        case "build":
7                setupDeps()
8                buildBinaries()
9+       case "build-single":
10+               setupPecoInGopath()
11+               buildSingleBinary()
12        default:
13                panic("Unknown action: " + action)
14        }
15@@ -201,6 +204,17 @@ func buildBinaryFor(osname, arch string) {
16        run("mv", file, filepath.Join(getBuildDir(), "artifacts"))
17 }
18 
19+func buildSingleBinary() {
20+       buildDir := getBuildDir()
21+       var goPath = fmt.Sprintf("%s:%s", buildDir, os.Getenv("GOPATH"))
22+       os.Setenv("GOPATH", goPath)
23+
24+       run("go", "build", "-o",
25+               filepath.Join("peco", "peco"),
26+               filepath.Join("cmd", "peco", "peco.go"),
27+       )
28+}
29+
30 func run(name string, args ...string) error {
31        splat := []string{name}
32        splat = append(splat, args...)
Note: See TracBrowser for help on using the repository browser.