Skip to content

Commit

Permalink
Update breaking-change to check against last published version (open…
Browse files Browse the repository at this point in the history
…-telemetry#454)

* Update breaking-change to check against last published version

* Fetch tags
  • Loading branch information
jack-berg authored and VinozzZ committed Jun 21, 2024
1 parent 5dd897c commit 3aed265
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# breaking-change checks against last published release which is determined
# using the last published tag
- name: Get tags
run: git fetch --tags origin
- name: Run make breaking-change with json output to annotate PR
# Formats JSON output into Github workflow commands
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message
Expand Down
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ BUF_DOCKER ?= bufbuild/buf:1.7.0

PROTOC := docker run --rm -u ${shell id -u} -v${PWD}:${PWD} -w${PWD} ${OTEL_DOCKER_PROTOBUF} --proto_path=${PWD}
BUF := docker run --rm -v "${PWD}:/workspace" -w /workspace ${BUF_DOCKER}
# When checking for protobuf breaking changes, check against the upstream repo's main branch.
# When checking for protobuf breaking changes, check against the latest release tag
LAST_RELEASE_TAG := $(shell git tag --sort=committerdate | tail -1)
# Options are described in https://docs.buf.build/breaking/usage#git
BUF_AGAINST ?= "https://github.com/open-telemetry/opentelemetry-proto.git"
BUF_AGAINST ?= "https://github.com/open-telemetry/opentelemetry-proto.git\#tag=$(LAST_RELEASE_TAG)"

PROTO_GEN_CPP_DIR ?= $(GENDIR)/cpp
PROTO_GEN_CSHARP_DIR ?= $(GENDIR)/csharp
Expand Down

0 comments on commit 3aed265

Please sign in to comment.