-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
43 lines (32 loc) · 663 Bytes
/
Makefile
File metadata and controls
43 lines (32 loc) · 663 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
40
41
42
43
# Image URL to use all building/pushing image targets
IMG ?= template-container-image:latest
# Run tests
test: build
go test -v ./...
# Build manager binary
build: fmt vet
go build -o app -ldflags '-w -extldflags "-static"' ./cmd
# Download dependencies
download:
go mod download
# Download dependencies
tidy: download
go mod tidy
# Run go fmt against code
fmt: tidy
go fmt ./...
# Run go vet against code
vet: tidy
go vet ./...
# Run
run: build
./app --gateway=1.2.3.4 --setGatewayDefault
# usage
help: build
./app --help
# Build the docker image
docker-build:
docker build . -t ${IMG}
# Push the docker image
docker-push:
docker push ${IMG}