forked from derailed/k9s
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
23 lines (17 loc) · 691 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
NAME := k9s
PACKAGE := github.com/derailed/$(NAME)/internal
VERSION := dev
GIT := $(shell git rev-parse --short HEAD)
DATE := $(shell date +%FT%T%Z)
default: help
test: ## Run all tests
@go test ./...
cover: ## Run test coverage suite
@go test ./... --coverprofile=cov.out
@go tool cover --html=cov.out
build: ## Builds the CLI
@go build \
-ldflags "-w -X ${PACKAGE}/cmd.version=${VERSION} -X ${PACKAGE}/cmd.commit=${GIT} -X ${PACKAGE}/cmd.date=${DATE}" \
-a -tags netgo -o execs/${NAME} *.go
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[38;5;69m%-30s\033[38;5;38m %s\033[0m\n", $$1, $$2}'