-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 721 Bytes
/
Copy pathMakefile
File metadata and controls
34 lines (25 loc) · 721 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
MODULE := github.com/launchpad001/kubeid
PROTO_DIR := api/proto
GEN_DIR := api/gen
PROTO_FILES := $(shell find $(PROTO_DIR) -name '*.proto')
.PHONY: all proto build test tidy clean docker
all: proto tidy build test
proto:
@mkdir -p $(GEN_DIR)
protoc \
--proto_path=$(PROTO_DIR) \
--go_out=$(GEN_DIR) --go_opt=module=github.com/launchpad001/kubeid/api/gen \
--go-grpc_out=$(GEN_DIR) --go-grpc_opt=module=github.com/launchpad001/kubeid/api/gen \
$(PROTO_FILES)
build:
go build -o bin/kubeid ./cmd/kubeid
test:
go test ./...
tidy:
go mod tidy
clean:
rm -rf bin/ $(GEN_DIR)/kubeid
IMAGE ?= ghcr.io/launchpad001/kubeid
TAG ?= latest
docker:
docker build -t $(IMAGE):$(TAG) -t kubeid:dev .