1 Star 0 Fork 0

quaker1/glide

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
GLIDE_GO_EXECUTABLE ?= go
DIST_DIRS := find * -type d -exec
VERSION ?= $(shell git describe --tags)
VERSION_INCODE = $(shell perl -ne '/^var version.*"([^"]+)".*$$/ && print "v$$1\n"' glide.go)
VERSION_INCHANGELOG = $(shell perl -ne '/^\# Release (\d+(\.\d+)+) / && print "$$1\n"' CHANGELOG.md | head -n1)
build:
${GLIDE_GO_EXECUTABLE} build -o glide -ldflags "-X main.version=${VERSION}" glide.go
install: build
install -d ${DESTDIR}/usr/local/bin/
install -m 755 ./glide ${DESTDIR}/usr/local/bin/glide
test:
${GLIDE_GO_EXECUTABLE} test . ./gb ./path ./action ./tree ./util ./godep ./godep/strip ./gpm ./cfg ./dependency ./importer ./msg ./repo ./mirrors
integration-test:
${GLIDE_GO_EXECUTABLE} build
./glide up
./glide install
clean:
rm -f ./glide.test
rm -f ./glide
rm -rf ./dist
bootstrap-dist:
${GLIDE_GO_EXECUTABLE} get -u github.com/Masterminds/gox
build-all:
gox -verbose \
-ldflags "-X main.version=${VERSION}" \
-os="linux darwin windows freebsd openbsd netbsd" \
-arch="amd64 386 armv5 armv6 armv7 arm64 s390x" \
-osarch="!darwin/arm64" \
-output="dist/{{.OS}}-{{.Arch}}/{{.Dir}}" .
dist: build-all
cd dist && \
$(DIST_DIRS) cp ../LICENSE {} \; && \
$(DIST_DIRS) cp ../README.md {} \; && \
$(DIST_DIRS) tar -zcf glide-${VERSION}-{}.tar.gz {} \; && \
$(DIST_DIRS) zip -r glide-${VERSION}-{}.zip {} \; && \
cd ..
verify-version:
@if [ "$(VERSION_INCODE)" = "v$(VERSION_INCHANGELOG)" ]; then \
echo "glide: $(VERSION_INCHANGELOG)"; \
elif [ "$(VERSION_INCODE)" = "v$(VERSION_INCHANGELOG)-dev" ]; then \
echo "glide (development): $(VERSION_INCHANGELOG)"; \
else \
echo "Version number in glide.go does not match CHANGELOG.md"; \
echo "glide.go: $(VERSION_INCODE)"; \
echo "CHANGELOG : $(VERSION_INCHANGELOG)"; \
exit 1; \
fi
.PHONY: build test install clean bootstrap-dist build-all dist integration-test verify-version
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quaker1/glide.git
git@gitee.com:quaker1/glide.git
quaker1
glide
glide
master

搜索帮助