forked from redhat-best-practices-for-k8s/l2discovery-lib
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 748 Bytes
/
Makefile
File metadata and controls
39 lines (27 loc) · 748 Bytes
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
28
29
30
31
32
33
34
35
36
37
38
39
GOLANGCI_VERSION=v2.8.0
GO_PACKAGES=$(shell go list ./... | grep -v vendor)
.PHONY: all clean test build build-l2discovery lint install-lint vet fmt image launch
all: build test
clean:
go clean ./...
fmt:
go fmt ./...
lint:
golangci-lint run
# Install golangci-lint v2
install-lint:
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@${GOLANGCI_VERSION}
vet:
go vet ${GO_PACKAGES}
# Build all packages except cmd/l2discovery (requires Linux headers for CGO)
build:
go build $$(go list ./... | grep -v cmd/l2discovery)
# Build l2discovery binary (Linux only, requires CGO)
build-l2discovery:
go build -o l2discovery ./cmd/l2discovery
test:
./scripts/test.sh
image:
./scripts/image.sh
launch:
./scripts/launch.sh