-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
32 lines (24 loc) · 857 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
SHELL := /bin/bash # Use bash syntax
# Set up variables
GO111MODULE=on
# Build ldflags
VERSION ?= "v0.0.0"
GITCOMMIT=$(shell git rev-parse HEAD)
BUILDDATE=$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')
GO_LDFLAGS=-ldflags "-X main.version=$(VERSION) \
-X main.buildHash=$(GITCOMMIT) \
-X main.buildDate=$(BUILDDATE)"
.PHONY: all test local-test
all: test
local-run-controller: ## Run a controller image locally for SERVICE
@go run ./cmd/controller/main.go \
--aws-region=us-west-2 \
--enable-development-logging \
--log-level=debug
test: ## Run code tests
go test -v ./...
local-test: ## Run code tests using go.local.mod file
go test -modfile=go.local.mod -v ./...
help: ## Show this help.
@grep -F -h "##" $(MAKEFILE_LIST) | grep -F -v grep | sed -e 's/\\$$//' \
| awk -F'[:#]' '{print $$1 = sprintf("%-30s", $$1), $$4}'