加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.14 KB
一键复制 编辑 原始数据 按行查看 历史
.PHONY: test race cover robeaux examples test_with_coverage fmt_check
excluding_vendor := $(shell go list ./... | grep -v /vendor/)
# Run tests on all non-vendor directories
test:
go test -v $(excluding_vendor)
# Run tests with race detection on all non-vendor directories
race:
go test -race $(excluding_vendor)
# Check for code well-formedness
fmt_check:
./ci/format.sh
# Test and generate coverage
test_with_coverage:
./ci/test.sh
robeaux:
ifeq (,$(shell which go-bindata))
$(error robeaux not built! https://github.com/jteeuwen/go-bindata is required to build robeaux assets )
endif
cd api ; \
npm install robeaux ; \
cp -r node_modules/robeaux robeaux-tmp ; \
cd robeaux-tmp ; \
rm Makefile package.json README.markdown ; \
touch css/fonts.css ; \
echo "Updating robeaux..." ; \
go-bindata -pkg="robeaux" -o robeaux.go -ignore=\\.git ./... ; \
mv robeaux.go ../robeaux ; \
cd .. ; \
rm -rf robeaux-tmp/ ; \
rm -rf node_modules/ ; \
go fmt ./robeaux/robeaux.go ; \
EXAMPLES := $(shell ls examples/*.go | sed -e 's/examples\///')
examples:
for example in $(EXAMPLES) ; do \
go build -o /tmp/$$example examples/$$example ; \
done ; \
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化