Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dapr-proto-ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
88f467a2feef18defec06b1425b8229b27a18045
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
.PHONY: proto
proto:
@command -v buf >/dev/null 2>&1 || { echo "buf is not installed. Install it from https://docs.buf.build/installation"; exit 1; }
@if [ ! -f .dapr-proto-ref ]; then echo "No .dapr-proto-ref file found. Run 'make proto-update' first."; exit 1; fi
@find ./src/proto -type f -name '*.js' -delete
@find ./src/proto -type f -name '*.ts' -delete
@COMMIT=$$(cat .dapr-proto-ref | tr -d '\n'); \
buf generate \
--template buf.gen.yaml \
--path dapr/proto/common/v1 \
--path dapr/proto/runtime/v1 \
"https://github.com/dapr/dapr.git#commit=$$COMMIT"

.PHONY: proto-update
proto-update:
@echo "Updating Dapr to latest commit..."
@git ls-remote https://github.com/dapr/dapr.git HEAD | cut -f1 > .dapr-proto-ref
@echo "Updated .dapr-proto-ref to: $$(cat .dapr-proto-ref)"
@$(MAKE) proto

PROTO_PATH := internal/proto
.PHONY: proto-check-diff
proto-check-diff:
@$(MAKE) proto
@# single‐shell if…then…fi block
@if ! git diff --quiet -- $(PROTO_PATH); then \
echo "::error ::Proto files are out of date. Please run 'make proto' and commit the changes."; \
git --no-pager diff -- $(PROTO_PATH); \
exit 1; \
fi
10 changes: 10 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: v2
managed:
enabled: true
plugins:
- remote: buf.build/bufbuild/es
out: src/proto
include_imports: true
opt:
- target=js+dts
- import_extension=none
160 changes: 0 additions & 160 deletions src/proto/dapr/proto/common/v1/common.proto

This file was deleted.

1 change: 0 additions & 1 deletion src/proto/dapr/proto/common/v1/common_grpc_pb.js

This file was deleted.

Loading
Loading