Skip to content

Commit

Permalink
add format/proto command
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Jun 28, 2023
1 parent 983f0a9 commit 4e4fb6c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ REVIEWDOG_VERSION := $(eval REVIEWDOG_VERSION := $(shell cat versions/RE
TELEPRESENCE_VERSION := $(eval TELEPRESENCE_VERSION := $(shell cat versions/TELEPRESENCE_VERSION))$(TELEPRESENCE_VERSION)
VALDCLI_VERSION := $(eval VALDCLI_VERSION := $(shell cat versions/VALDCLI_VERSION))$(VALDCLI_VERSION)
YQ_VERSION := $(eval YQ_VERSION := $(shell cat versions/YQ_VERSION))$(YQ_VERSION)
BUF_VERSION := $(eval BUF_VERSION := $(shell cat versions/BUF_VERSION))$(BUF_VERSION)

OTEL_OPERATOR_RELEASE_NAME ?= opentelemetry-operator
PROMETHEUS_RELEASE_NAME ?= prometheus
Expand Down Expand Up @@ -396,7 +397,8 @@ format: \
format/go \
format/json \
format/md \
format/yaml
format/yaml \
format/proto

.PHONY: format/go
## run golines, gofumpt, goimports for all go files
Expand Down Expand Up @@ -448,6 +450,11 @@ format/json: \
"charts/**/*.json" \
"hack/**/*.json"

.PHONY: format/proto
format/proto: \
buf/install \
buf format -w

.PHONY: deps
## resolve dependencies
deps: \
Expand Down
9 changes: 9 additions & 0 deletions Makefile.d/tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,12 @@ textlint/install:
textlint/ci/install:
npm init -y
npm install --save-dev textlint textlint-rule-en-spell textlint-rule-prh textlint-rule-write-good

.PHONY: buf/install
buf/install: $(BINDIR)/buf

$(BINDIR)/buf:
curl -sSL \
"https://github.com/bufbuild/buf/releases/download/v$(BUF_VERSION)/buf-$(uname -s)-$(uname -m)" \
-o "${BINDIR}/buf" && \
chmod +x "${BINDIR}/buf"
1 change: 1 addition & 0 deletions versions/BUF_VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.2.2

0 comments on commit 4e4fb6c

Please sign in to comment.