Skip to content

Commit

Permalink
Rename Makefile.proto to avoid interpretation as proto file (#1468)
Browse files Browse the repository at this point in the history
The main reason for the change is I'm trying to use this library with Bazel,
using gazelle. Gazelle automates creation of the Bazel rules for a Go module.
Gazelle assumes files ending in '.proto' are Protocol Buffer files and invokes
protoc on the file to generate the Go code for the proto file. Unfortunately,
protoc doesn't seem to like Makefiles.

As a side-benefit, editors that don't support Emacs mode hints
`-*- mode: makefile; -*-` won't try to highlight the Makefile as a protobuf
file.
  • Loading branch information
jschaf committed Jan 15, 2021
1 parent 979ff51 commit 0df8cd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/protogen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
with:
go-version: '^1.14.0'
- run: sudo apt-get -y install rsync wget unzip
- run: make -f Makefile.proto protobuf clean
- run: make -f Makefile.protos protobuf clean
- uses: stefanzweifel/git-auto-commit-action@v4
id: commit-changes
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile.proto → Makefile.protos
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This Makefile.proto has rules to generate go code for otlp
# This Makefile.protos has rules to generate go code for otlp
# exporter. It does it by copying the proto files from
# `exporters/otlp/internal/opentelemetry-proto` (which is a
# submodule that needs to be checked out) into `gen/proto`, changing
Expand Down

0 comments on commit 0df8cd6

Please sign in to comment.