forked from jetstack/version-checker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (18 loc) · 793 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
BINDIR ?= $(CURDIR)/bin
ARCH ?= amd64
help: ## display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
.PHONY: help build docker all clean
test: ## test version-checker
go test ./...
build: ## build version-checker
mkdir -p $(BINDIR)
CGO_ENABLED=0 go build -o ./bin/version-checker ./cmd/.
verify: test build ## tests and builds version-checker
image: ## build docker image
GOARCH=$(ARCH) GOOS=linux CGO_ENABLED=0 go build -o ./bin/version-checker-linux ./cmd/.
docker build -t quay.io/jetstack/version-checker:v0.2.1 .
clean: ## clean up created files
rm -rf \
$(BINDIR)
all: test build docker ## runs test, build and docker