mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-05-25 05:07:44 +08:00

also needs to update docker/docker to a60b458 (22.06 branch) otherwise build breaks since docker/cli#3512 with: # github.com/docker/cli/cli/flags vendor/github.com/docker/cli/cli/flags/common.go:40:37: undefined: client.EnvOverrideCertPath vendor/github.com/docker/cli/cli/flags/common.go:41:37: undefined: client.EnvTLSVerify vendor/github.com/docker/cli/cli/flags/common.go:89:76: undefined: client.EnvOverrideHost needs also to update github.com/spf13/cobra to v1.5.0 otherwise build breaks with: # github.com/docker/cli/cli-plugins/plugin vendor/github.com/docker/cli/cli-plugins/plugin/plugin.go:130:4: unknown field 'HiddenDefaultCmd' in struct literal of type cobra.CompletionOptions Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
36 lines
903 B
Makefile
36 lines
903 B
Makefile
BIN="./bin"
|
|
SRC=$(shell find . -name "*.go")
|
|
|
|
ifeq (, $(shell which golangci-lint))
|
|
$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh")
|
|
endif
|
|
|
|
ifeq (, $(shell which richgo))
|
|
$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")
|
|
endif
|
|
|
|
.PHONY: fmt lint test install_deps clean
|
|
|
|
default: all
|
|
|
|
all: fmt test
|
|
|
|
fmt:
|
|
$(info ******************** checking formatting ********************)
|
|
@test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)
|
|
|
|
lint:
|
|
$(info ******************** running lint tools ********************)
|
|
golangci-lint run -v
|
|
|
|
test: install_deps
|
|
$(info ******************** running tests ********************)
|
|
richgo test -v ./...
|
|
|
|
install_deps:
|
|
$(info ******************** downloading dependencies ********************)
|
|
go get -v ./...
|
|
|
|
clean:
|
|
rm -rf $(BIN)
|