Skip to content

Commit f5f7ed3

Browse files
author
ZHAO Yijun
authored
fix vgo build (#2)
* Update README.md * fix vgo build * update go.mod
1 parent 53e98cc commit f5f7ed3

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

Makefile

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
all:install
22

3-
GOPATH:=$(CURDIR)/../../../../
4-
export GOPATH
53
export PYTHONPATH=.
64

5+
# FIXME: When this issue is done(https://github.com/golang/go/issues/23965#issuecomment-409232583)
6+
# Determine the compiler and version
7+
COMPILER_HELP := $(shell $(CC) --help | head -n 1)
8+
ifneq (,$(findstring clang,$(COMPILER_HELP)))
9+
COMPILER = clang
10+
else ifneq (,$(findstring gcc,$(COMPILER_HELP)))
11+
COMPILER = gcc
12+
else
13+
COMPILER = unknown
14+
endif
15+
716
test:
817
./misc/gobeansdb_server.sh start
918
go version
@@ -19,4 +28,4 @@ pytest:install
1928
./tests/run_test.sh
2029

2130
install:
22-
vgo install github.com/douban/gobeansproxy
31+
CC=$(COMPILER) vgo install ./

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ A proxy for [Gobeansdb](https://github.com/douban/gobeansdb).
44

55
## Prepare
66

7-
GoBeansDB use `vgo` manage dependencies, please install [vgo](https://godoc.org/golang.org/x/vgo) first.
7+
GoBeansProxy use `vgo` manage dependencies, please install [vgo](https://godoc.org/golang.org/x/vgo) first.
8+
Supported Go version: 1.10.1+
89

910
## Install
1011

1112
```
12-
$ cd ${GOPATH}
13-
$ git clone http://github.com/douban/gobeansproxy.git src/github.com/douban/gobeansproxy
14-
$ cd src/github.com/douban/gobeansproxy
13+
$ git clone http://github.com/douban/gobeansproxy.git
14+
$ cd gobeansproxy
1515
$ make
1616
```
1717

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/douban/gobeansproxy
22

33
require (
44
github.com/davecgh/go-spew v1.1.0 // indirect
5-
github.com/douban/gobeansdb v0.0.0-20180809060252-7f57d32485c3
5+
github.com/douban/gobeansdb v1.0.1
66
github.com/pmezard/go-difflib v1.0.0 // indirect
77
github.com/stretchr/testify v1.2.2
88
gopkg.in/yaml.v2 v2.2.1

0 commit comments

Comments
 (0)