-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
25 lines (22 loc) · 818 Bytes
/
Makefile
File metadata and controls
25 lines (22 loc) · 818 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
protoc:
ifeq (, $(shell which protoc))
$(error "No protoc in $(PATH), consider installing it from https://github.com/protocolbuffers/protobuf#protocol-compiler-installation")
endif
ifeq (, $(shell which protoc-gen-go))
go install google.golang.org/protobuf/cmd/protoc-gen-go
endif
ifeq (, $(shell which protoc-gen-go-grpc))
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
endif
ifeq (, $(shell [ -f 'generated/api/api.proto' ] && echo 1))
mkdir -p generated/api
wget https://raw.githubusercontent.com/external-secrets-operator/operator/main/api.proto -P generated/api/
endif
protoc --proto_path=generated/api --go_out=generated/api --go-grpc_out=generated/api generated/api/api.proto
mod:
go mod tidy
go mod verify
build: protoc
go build -o bin/backend ./.
test: protoc
go test -v ./internal/...