代码拉取完成,页面将自动刷新
.PHONY: build install clean test integration dep release
VERSION=`egrep -o '[0-9]+\.[0-9a-z.\-]+' version.go`
GIT_SHA=`git rev-parse --short HEAD || echo`
build:
@echo "Building confd..."
@mkdir -p bin
@go build -ldflags "-X main.GitSHA=${GIT_SHA}" -o bin/confd .
install:
@echo "Installing confd..."
@install -c bin/confd /usr/local/bin/confd
clean:
@rm -f bin/*
test:
@echo "Running tests..."
@go test `go list ./... | grep -v vendor/`
integration:
@echo "Running integration tests..."
@for i in `find ./integration -name test.sh`; do \
echo "Running $$i"; \
bash $$i || exit 1; \
bash integration/expect/check.sh || exit 1; \
rm /tmp/confd-*; \
done
dep:
@dep ensure
release:
@docker build -q -t confd_builder -f Dockerfile.build.alpine .
@for platform in darwin linux windows; do \
if [ $$platform == windows ]; then extension=.exe; fi; \
docker run -it --rm -v ${PWD}:/app -e "GOOS=$$platform" -e "GOARCH=amd64" -e "CGO_ENABLED=0" confd_builder go build -ldflags="-s -w -X main.GitSHA=${GIT_SHA}" -o bin/confd-${VERSION}-$$platform-amd64$$extension; \
done
@docker run -it --rm -v ${PWD}:/app -e "GOOS=linux" -e "GOARCH=arm64" -e "CGO_ENABLED=0" confd_builder go build -ldflags="-s -w -X main.GitSHA=${GIT_SHA}" -o bin/confd-${VERSION}-linux-arm64;
@upx bin/confd-${VERSION}-*
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。