-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ ARANGODB_NS=arangodb | |
|
||
DOCKER=docker | ||
PROTOC=protoc | ||
BUF_CONTAINER=buf:local | ||
|
||
export | ||
|
||
|
@@ -122,7 +123,6 @@ install-lint-tools: | |
@go install github.com/kisielk/errcheck@latest | ||
@go install github.com/rhysd/actionlint/cmd/actionlint@latest | ||
@go install github.com/client9/misspell/cmd/misspell@latest | ||
@go install github.com/bufbuild/buf/cmd/[email protected] | ||
@npm ci | ||
|
||
install-go-test-tools: | ||
|
@@ -140,10 +140,6 @@ migration-tests: cmd/draconctl/bin | |
|
||
test: go-tests migration-tests | ||
|
||
fmt-proto: | ||
@echo "Tidying up Proto files" | ||
@buf format -w ./api/proto | ||
|
||
install-go-fmt-tools: | ||
@go install github.com/bufbuild/buf/cmd/[email protected] | ||
@go install golang.org/x/tools/cmd/goimports@latest | ||
|
@@ -315,9 +311,23 @@ dev-deploy: deploy-cluster dev-infra dev-dracon | |
dev-teardown: | ||
@kind delete clusters dracon-demo | ||
|
||
generate-protos: install-lint-tools | ||
@echo "Generating Protos" | ||
@buf generate | ||
build_buf_container: | ||
$(DOCKER) build . -t $(BUF_CONTAINER) -f containers/Dockerfile.buf | ||
|
||
run_buf: build_buf_container | ||
$(DOCKER) run --volume "$(shell pwd):/workspace" --workdir /workspace $(BUF_CONTAINER) $(ARGS) | ||
|
||
fmt-proto: build_buf_container | ||
@echo "Tidying up Proto files" | ||
$(MAKE) run_buf ARGS="format -w" | ||
|
||
lint-proto: build_buf_container | ||
@echo "Linting Proto files" | ||
$(MAKE) run_buf ARGS="lint --exclude-path vendor" | ||
|
||
generate-proto: build_buf_container | ||
@echo "Generating Proto files" | ||
$(MAKE) run_buf ARGS="generate" | ||
|
||
######################################## | ||
########### RELEASE UTILITIES ########## | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
version: v2 | ||
lint: | ||
use: | ||
- DEFAULT | ||
- STANDARD | ||
- COMMENTS | ||
- UNARY_RPC | ||
- PACKAGE_NO_IMPORT_CYCLE | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM golang:alpine AS golang | ||
ENV GO111MODULE=on | ||
|
||
RUN go install google.golang.org/protobuf/cmd/[email protected] | ||
|
||
FROM bufbuild/buf:1.45.0 AS buf | ||
|
||
FROM scratch | ||
COPY --from=golang /go/bin/protoc-gen-go /go/bin/protoc-gen-go | ||
COPY --from=buf /usr/local/bin/buf /usr/local/bin/buf | ||
ENV PATH="/go/bin:${PATH}" | ||
ENTRYPOINT ["/usr/local/bin/buf"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.