mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
4d1f9eda9d
* Add functionality for etcd snapshot/restore to and from S3 compatible backends. * Update etcd restore functionality to extract and write certificates and configs from snapshot.
33 lines
1.1 KiB
Makefile
33 lines
1.1 KiB
Makefile
GOPATH := $(shell go env GOPATH)
|
|
TMPDIR := $(shell mktemp -d)
|
|
|
|
all: checks
|
|
|
|
.PHONY: examples docs
|
|
|
|
checks: lint vet test examples functional-test
|
|
|
|
lint:
|
|
@mkdir -p ${GOPATH}/bin
|
|
@which golangci-lint 1>/dev/null || (echo "Installing golangci-lint" && curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.27.0)
|
|
@echo "Running $@ check"
|
|
@GO111MODULE=on ${GOPATH}/bin/golangci-lint cache clean
|
|
@GO111MODULE=on ${GOPATH}/bin/golangci-lint run --timeout=5m --config ./.golangci.yml
|
|
|
|
vet:
|
|
@GO111MODULE=on go vet ./...
|
|
|
|
test:
|
|
@GO111MODULE=on SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minio SECRET_KEY=minio123 ENABLE_HTTPS=1 MINT_MODE=full go test -race -v ./...
|
|
|
|
examples:
|
|
@$(foreach v,$(wildcard examples/s3/*), go build -o ${TMPDIR}/$(basename $(v)) $(v) || exit 1;)
|
|
|
|
functional-test:
|
|
@GO111MODULE=on SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minio SECRET_KEY=minio123 ENABLE_HTTPS=1 MINT_MODE=full go run functional_tests.go
|
|
|
|
clean:
|
|
@echo "Cleaning up all the generated files"
|
|
@find . -name '*.test' | xargs rm -fv
|
|
@find . -name '*~' | xargs rm -fv
|