blob: 7a3d95434146c947f1420b98163a77e52b691d39 (
plain)
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
|
GOLANGCI_LINT_VERSION := v1.27.0 # version used by $GOLANGCI_LINT_IMAGE
GO_BUILD_TAGS := continuous_profiler_stackdriver
.PHONY: all setup generate-mocks build clean
all: gitlab-pages
setup: .GOPATH/.ok
mkdir -p bin/
# From https://marcofranssen.nl/manage-go-tools-via-go-modules/
@cat ./tools.go | \
grep _ | \
awk -F'"' '{print $$2}' | \
GOBIN=$(CURDIR)/bin xargs -tI % go install %
generate-mocks: .GOPATH/.ok
$Q bin/mockgen -source=internal/interface.go -destination=internal/mocks/mocks.go -package=mocks
build: .GOPATH/.ok
$Q GOBIN=$(CURDIR)/bin go install $(if $V,-v) $(VERSION_FLAGS) -tags "${GO_BUILD_TAGS}" -buildmode exe $(IMPORT_PATH)
clean:
$Q rm -rf bin .GOPATH gitlab-pages
gitlab-pages: build
$Q cp -f ./bin/gitlab-pages .
|