forked from prometheus-community/avalanche
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
27 lines (20 loc) · 816 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Ensure that 'all' is the default target otherwise it will be the first target from Makefile.common.
all::
# Needs to be defined before including Makefile.common to auto-generate targets
DOCKER_ARCHS ?= amd64 armv7 arm64 ppc64le s390x
DOCKER_REPO ?= prometheuscommunity
include Makefile.common
DOCKER_IMAGE_NAME ?= avalanche
GOIMPORTS = goimports
$(GOIMPORTS):
@go install golang.org/x/tools/cmd/goimports@latest
GOFUMPT = gofumpt
$(GOFUMPT):
@go install mvdan.cc/gofumpt@latest
GO_FILES = $(shell find . -path ./vendor -prune -o -name '*.go' -print)
.PHONY: format
format: $(GOFUMPT) $(GOIMPORTS)
@echo ">> formating imports)"
@$(GOIMPORTS) -local github.com/prometheus-community/avalanche -w $(GO_FILES)
@echo ">> gofumpt-ing the code; golangci-lint requires this"
@$(GOFUMPT) -extra -w $(GO_FILES)