mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 10:05:18 +00:00
Fix remote check proto breaking when not branching from master (#1409)
* fix check remote breaking when not branching from master -- always use current git branch when ref'ing * fix remote command when overridden
This commit is contained in:
parent
a4de1b7fb7
commit
252fafa53a
2
.github/workflows/proto.yml
vendored
2
.github/workflows/proto.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
|||||||
- run: make check-proto-lint
|
- run: make check-proto-lint
|
||||||
- run: make check-proto-format
|
- run: make check-proto-format
|
||||||
- run: make check-proto-breaking-remote
|
- run: make check-proto-breaking-remote
|
||||||
- run: BUF_CHECK_BREAKING_AGAINST="branch=$GITHUB_BASE_REF" make check-proto-breaking-remote
|
- run: BUF_CHECK_BREAKING_AGAINST_REMOTE="branch=$GITHUB_BASE_REF" make check-proto-breaking-remote
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
- run: make check-proto-gen
|
- run: make check-proto-gen
|
||||||
- run: make check-proto-gen-doc
|
- run: make check-proto-gen-doc
|
||||||
|
@ -44,6 +44,7 @@ check-proto-format: proto-format
|
|||||||
@git diff --exit-code proto/**/*.proto > /dev/null || (echo "Protobuf format is not up to date! Please run \`make proto-format\`."; exit 1)
|
@git diff --exit-code proto/**/*.proto > /dev/null || (echo "Protobuf format is not up to date! Please run \`make proto-format\`."; exit 1)
|
||||||
|
|
||||||
BUF_CHECK_BREAKING_AGAINST ?= ref=HEAD~1
|
BUF_CHECK_BREAKING_AGAINST ?= ref=HEAD~1
|
||||||
|
BUF_CHECK_BREAKING_AGAINST_REMOTE ?= branch=$(GIT_BRANCH),$(BUF_CHECK_BREAKING_AGAINST)
|
||||||
|
|
||||||
.PHONY: check-proto-breaking
|
.PHONY: check-proto-breaking
|
||||||
check-proto-breaking: install-build-deps
|
check-proto-breaking: install-build-deps
|
||||||
@ -53,7 +54,7 @@ check-proto-breaking: install-build-deps
|
|||||||
.PHONY: check-proto-breaking-remote
|
.PHONY: check-proto-breaking-remote
|
||||||
check-proto-breaking-remote: install-build-deps
|
check-proto-breaking-remote: install-build-deps
|
||||||
@echo "Checking for proto backward compatibility"
|
@echo "Checking for proto backward compatibility"
|
||||||
@$(BUF) breaking --against '$(HTTPS_GIT)#$(BUF_CHECK_BREAKING_AGAINST)'
|
$(BUF) breaking --against '$(HTTPS_GIT)#$(BUF_CHECK_BREAKING_AGAINST_REMOTE)'
|
||||||
|
|
||||||
.PHONY: proto-gen-all
|
.PHONY: proto-gen-all
|
||||||
proto-gen-all: proto-gen proto-gen-doc proto-gen-swagger
|
proto-gen-all: proto-gen proto-gen-doc proto-gen-swagger
|
||||||
|
Loading…
Reference in New Issue
Block a user