diff options
author | Paul Okstad <pokstad@gitlab.com> | 2020-09-14 19:13:24 +0300 |
---|---|---|
committer | Paul Okstad <pokstad@gitlab.com> | 2020-09-14 19:13:24 +0300 |
commit | e61cef5003bfea5df64cc35f3ca6de441ea320d5 (patch) | |
tree | f63a610585218d45847af0f3fff19a42cee1fe7d | |
parent | 7e8f8d62102750aac6224c6f92d130f856586f58 (diff) | |
parent | 41217b88b8bce0dcac171d8f1d5e9af0270a06f2 (diff) |
Merge branch 'ps-no-changes-task-shows-diff' into 'master'
Protobuf generates different code locally and on CI
See merge request gitlab-org/gitaly!2555
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | .gitlab-ci.yml | 1 | ||||
-rw-r--r-- | Makefile | 7 |
3 files changed, 8 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore index 35e7aeb1f..4f6c22b79 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ gitaly.pid /vendor /gitaly-*.gem /gitaly-blackbox +/proto.diff diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e97f863a1..ac7c6d6dd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,6 +95,7 @@ proto: paths: - ruby/proto/gitaly/* - proto/go/gitalypb/* + - proto.diff when: on_failure build: @@ -280,7 +280,7 @@ clean-ruby-vendor-go: mkdir -p ${SOURCE_DIR}/ruby/vendor && find ${SOURCE_DIR}/ruby/vendor -type f -name '*.go' -delete .PHONY: check-proto -check-proto: proto no-changes +check-proto: proto no-proto-changes .PHONY: rubocop rubocop: ${SOURCE_DIR}/.ruby-bundle @@ -330,6 +330,11 @@ proto-lint: ${PROTOC} ${PROTOC_GEN_GO} no-changes: ${Q}${GIT} status --porcelain | awk '{ print } END { if (NR > 0) { exit 1 } }' +.PHONY: no-proto-changes +no-proto-changes: + ${Q}${GIT} diff -- '*.pb.go' 'ruby/proto/gitaly' >proto.diff + ${Q}if [ -s proto.diff ]; then echo "There is a difference in generated proto files. Please take a look at proto.diff file." && exit 1; fi + .PHONY: smoke-test smoke-test: all rspec ${Q}go test -tags "${GO_BUILD_TAGS}" ./internal/gitaly/rubyserver |