generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
36 lines (25 loc) · 934 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
28
29
30
31
32
33
34
35
36
BIN_DIR ?= bin
GO ?= go
all: fmt vet check
$(BIN_DIR):
mkdir -p $(BIN_DIR)
build: $(BIN_DIR)
CGO_ENABLED=0 $(GO) build -ldflags='-s -w -extldflags="-static" -buildid=""' -trimpath -o $(BIN_DIR)/iptables-wrapper github.com/kubernetes-sigs/iptables-wrappers
vet: ## Run go vet against code.
$(GO) vet ./...
fmt: ## Check formatting
if [ "$$(gofmt -e -l . | tee /dev/tty | wc -l)" -gt 0 ]; then \
echo "Go files need formatting"; \
exit 1; \
fi
check: check-debian check-debian-nosanity check-debian-backports check-fedora check-alpine
check-debian: build
./test/run-test.sh --build-fail debian
check-debian-nosanity: build
./test/run-test.sh --build-arg="INSTALL_ARGS=--no-sanity-check" --nft-fail debian-nosanity
check-debian-backports: build
./test/run-test.sh --build-arg="REPO=buster-backports" debian-backports
check-fedora: build
./test/run-test.sh fedora
check-alpine: build
./test/run-test.sh alpine