-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bumping buf to v2 to build correctly and removing out of date or unus…
…ed configuration. Bumping proto plugins to latest.
- Loading branch information
Showing
87 changed files
with
1,419 additions
and
2,291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,2 @@ | ||
# Generated by buf. DO NOT EDIT. | ||
version: v1 | ||
deps: | ||
- remote: buf.build | ||
owner: googleapis | ||
repository: googleapis | ||
commit: 75b4300737fb4efca0831636be94e517 | ||
- remote: buf.build | ||
owner: grpc-ecosystem | ||
repository: grpc-gateway | ||
commit: a1ecdc58eccd49aa8bea2a7a9022dc27 | ||
version: v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,12 @@ | ||
--- | ||
version: v1 | ||
version: v2 | ||
lint: | ||
use: | ||
- DEFAULT | ||
- STANDARD | ||
- COMMENTS | ||
- UNARY_RPC | ||
- PACKAGE_NO_IMPORT_CYCLE | ||
except: | ||
# we use Please to run protoc where we only need the last part of the | ||
# package name to match the directory name. | ||
- PACKAGE_DIRECTORY_MATCH | ||
|
||
deps: | ||
# buf requires us to add the third party protos here as deps. | ||
# Run: | ||
# $ ./pleasew run "//third_party/binary/bufbuild/buf:buf|buf" -- mod update | ||
# when you update this to update the lock file. | ||
- buf.build/googleapis/googleapis | ||
- buf.build/grpc-ecosystem/grpc-gateway |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.