2 Star 0 Fork 0

mirrors_sourcegraph/srclib

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.31 KB
一键复制 编辑 原始数据 按行查看 历史
Beyang Liu 提交于 2016-05-25 15:28 +08:00 . make test target
ifndef GOBIN
ifeq ($(OS),Windows_NT)
GOBIN := $(shell cmd /C "echo %GOPATH%| cut -d';' -f1")
GOBIN := $(subst \,/,$(GOBIN))/bin
else
GOBIN := $(shell echo $$GOPATH | cut -d':' -f1 )/bin
endif
endif
ifeq ($(OS),Windows_NT)
EXE := srclib.exe
else
EXE := srclib
endif
MAKEFLAGS+=--no-print-directory
.PHONY: default install srclib release upload-release check-release test
default: govendor install
install: srclib
srclib: ${GOBIN}/${EXE}
${GOBIN}/${EXE}: $(shell /usr/bin/find . -type f -and -name '*.go')
go install ./cmd/srclib
govendor:
go get github.com/kardianos/govendor
govendor sync
release: upload-release check-release
upload-release:
@bash -c 'if [[ "$(V)" == "" ]]; then echo Must specify version: make release V=x.y.z; exit 1; fi'
go get github.com/laher/goxc
goxc -q -pv="$(V)"
git tag v$(V)
git push --tags
check-release:
@bash -c 'if [[ "$(V)" == "" ]]; then echo Must specify version: make release V=x.y.z; exit 1; fi'
@rm -rf /tmp/srclib-$(V).gz
curl -Lo /tmp/srclib-$(V).gz "https://srclib-release.s3.amazonaws.com/srclib/$(V)/$(shell go env GOOS)-$(shell go env GOARCH)/srclib.gz"
cd /tmp && gunzip -f srclib-$(V).gz && chmod +x srclib-$(V)
echo; echo
/tmp/srclib-$(V) version
echo; echo
@echo Released srclib $(V)
test:
go test -race -v $(go list ./... | grep -v /vendor/)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_sourcegraph/srclib.git
git@gitee.com:mirrors_sourcegraph/srclib.git
mirrors_sourcegraph
srclib
srclib
master

搜索帮助