1 Star 0 Fork 1

dawnJun/jabba

forked from yeluo/jabba 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 1.75 KB
一键复制 编辑 原始数据 按行查看 历史
BugDiver 提交于 2018-09-24 18:23 . Add ldflags to reduce jabba binary size.
SHELL := /bin/bash -o pipefail
VERSION := $(shell git describe --tags --abbrev=0)
fetch:
go get \
github.com/mitchellh/gox \
github.com/Masterminds/glide \
github.com/modocache/gover \
github.com/aktau/github-release && \
glide install
clean:
rm -f ./jabba
rm -rf ./build
fmt:
gofmt -l -s -w `find . -type f -name '*.go' -not -path "./vendor/*"`
test:
go vet `go list ./... | grep -v /vendor/`
SRC=`find . -type f -name '*.go' -not -path "./vendor/*"` && gofmt -l -s $$SRC | read && gofmt -l -s -d $$SRC && exit 1 || true
go test `go list ./... | grep -v /vendor/`
test-coverage:
go list ./... | grep -v /vendor/ | xargs -L1 -I{} sh -c 'go test -coverprofile `basename {}`.coverprofile {}' && \
gover && \
go tool cover -html=gover.coverprofile -o coverage.html && \
rm *.coverprofile
build:
go build -ldflags "-s -w -X main.version=${VERSION}"
build-release:
GOARM=7 gox -verbose \
-ldflags "-X main.version=${VERSION}" \
-osarch="windows/amd64 linux/386 linux/amd64 darwin/amd64 linux/arm linux/arm64" \
-output="release/{{.Dir}}-${VERSION}-{{.OS}}-{{.Arch}}" .
install: build
JABBA_MAKE_INSTALL=true JABBA_VERSION=${VERSION} sh install.sh
publish: clean build-release
test -n "$(GITHUB_TOKEN)" # $$GITHUB_TOKEN must be set
github-release release --user shyiko --repo jabba --tag ${VERSION} \
--name "${VERSION}" --description "${VERSION}" && \
github-release upload --user shyiko --repo jabba --tag ${VERSION} \
--name "jabba-${VERSION}-windows-amd64.exe" --file release/jabba-${VERSION}-windows-amd64.exe; \
for qualifier in darwin-amd64 linux-386 linux-amd64 linux-arm linux-arm64; do \
github-release upload --user shyiko --repo jabba --tag ${VERSION} \
--name "jabba-${VERSION}-$$qualifier" --file release/jabba-${VERSION}-$$qualifier; \
done
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/wswj666666/jabba.git
git@gitee.com:wswj666666/jabba.git
wswj666666
jabba
jabba
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385