Closed chai2010 closed 7 years ago
$ brew install make
$ alias make=gmake
$ make --version
Ref: http://brew.sh
Makefile 使用太多新的语法和依赖太多的外部工具不利于以后维护。 我个人的观点是尽量使用少的非通用的特性和减少外部依赖。
建议在readme里面给出macOS环境的使用说明。 如果这个PR不合适,我稍后会关闭。
支持在 Readme 给出使用说明,支持少用非通用的特性。
Makefile 中的使用 Docker 运行 unit test,是因为如果直接用 Travis 的 Go 1.5 Runtime 没法安装 golint,所以采用了 Travis 的 Go 1.7 环境来跑 make check
,而使用 Docker 来跑各个语言版本的 make unit-test
。之所以把 Dockerfile 的内容放在 Makefile 里面,是不想在 Project 中放置额外的 Dockerfile,另外如果把这些 Dockerfile 放在 build
目录下也有歧义,因为并没有从这些 Dockerfile 中 Build 出可用的 Image,
但是现在看 Go 1.5 已经算是一个较老的版本了,可以跳过 1.5 版本,直接在 Travis 中的 1.6、1.7、1.8、1.9 的环境中跑 make unit-test
,这样就不需要引入 Docker 了。
建议去掉 Makefile 中的 unit-runtime-go-xxx
target,修改一下 .travis.yaml
,以及更新 README.md
。
Makefile 中的语法比较新,你使用 make 4.0 就可以了