Skip to content

Commit

Permalink
[build] Generate fdset file for decoding Kafka messages with pq
Browse files Browse the repository at this point in the history
  • Loading branch information
teo committed Mar 19, 2024
1 parent 831178d commit 9c62431
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ HAS_PROTOC := $(shell command -v $(GOPROTOCPATH) 2> /dev/null)
.EXPORT_ALL_VARIABLES:
CGO_ENABLED = 0

.PHONY: build all install generate test debugtest vet fmt clean cleanall help $(WHAT) tools vendor doc docs
.PHONY: build all install generate test debugtest vet fmt clean cleanall help $(WHAT) tools vendor doc docs fdset

build: $(WHAT)

Expand Down Expand Up @@ -273,6 +273,15 @@ tools/protoc:

docs: docs/coconut docs/grpc docs/swaggo

fdset:
@echo -e "building fdset files \033[1;33m==>\033[0m \033[1;34m./common/protos\033[0m"

@mkdir -p fdset
@cd common/protos && protoc -o events.fdset events.proto && cd ../..
@mv common/protos/events.fdset fdset

@echo -e "to consume with \033[1;33mhttps://github.com/sevagh/pq\033[0m: FDSET_PATH=./fdset pq kafka aliecs.environment --brokers kafka-broker-hostname:9092 --beginning --msgtype events.Event"

docs/coconut:
@echo -e "generating coconut documentation \033[1;33m==>\033[0m \033[1;34m./coconut/doc\033[0m"
@cd coconut/doc && go run . && cd ../..
Expand Down

0 comments on commit 9c62431

Please sign in to comment.