-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (30 loc) · 684 Bytes
/
Makefile
File metadata and controls
39 lines (30 loc) · 684 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
RUNTIME ?= podman
REPOOWNER ?= fromani
IMAGENAME ?= numalign
IMAGETAG ?= latest
all: dist
outdir:
mkdir -p _output || :
.PHONY: dist
dist: binaries
.PHONY: binaries
binaries: outdir
# go flags are set in here
./hack/build-binaries.sh
.PHONY: test-unit
test-unit:
go test ./pkg/...
clean:
rm -rf _output
.PHONY: image
image: binaries
@echo "building image"
$(RUNTIME) build -f Dockerfile -t quay.io/$(REPOOWNER)/$(IMAGENAME):$(IMAGETAG) .
.PHONY: push
push: image
@echo "pushing image"
$(RUNTIME) push quay.io/$(REPOOWNER)/$(IMAGENAME):$(IMAGETAG)
.PHONY: gofmt
gofmt:
@echo "Running gofmt"
gofmt -s -w `find . -path ./vendor -prune -o -type f -name '*.go' -print`