From 66a0771c065219df5603e8746ce12f796400e7a5 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+smarshall-spitzbart@users.noreply.github.com> Date: Wed, 5 Jul 2023 20:51:57 -0700 Subject: [PATCH] lets try --- .dockerignore | 1 - Makefile | 32 ++++++++++++-------------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.dockerignore b/.dockerignore index 333418f12d..75f5c2dfe0 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,4 +6,3 @@ Dockerfile scripts/ .vscode/ .github/ -proto/ diff --git a/Makefile b/Makefile index 28c02f7c85..69cdfa74be 100644 --- a/Makefile +++ b/Makefile @@ -122,27 +122,19 @@ proto-gen: @$(protoImage) sh ./scripts/protocgen.sh; proto-check: - @if git diff --quiet --exit-code main...HEAD -- proto; then \ - echo "Pass! No committed changes found in /proto directory between the currently checked out branch and main."; \ + @if git diff --quiet; then \ + echo "No files were modified before running 'make proto-gen'."; \ else \ - echo "Committed changes found in /proto directory between the currently checked out branch and main."; \ - modified_protos=$$(git diff --name-only main...HEAD proto); \ - modified_pb_files= ; \ - for proto_file in $${modified_protos}; do \ - proto_name=$$(basename "$${proto_file}" .proto); \ - pb_files=$$(find x/ccv -name "$${proto_name}.pb.go"); \ - for pb_file in $${pb_files}; do \ - if git diff --quiet --exit-code main...HEAD -- "$${pb_file}"; then \ - echo "Missing committed changes in $${pb_file}"; \ - exit 1; \ - else \ - modified_pb_files+="$${pb_file} "; \ - fi \ - done \ - done; \ - echo "Pass! Correctly modified pb files: "; \ - echo $${modified_pb_files}; \ - fi + echo "Error: Uncommitted changes exist before running 'make proto-gen'. Please commit or stash your changes."; \ + exit 1; \ + fi + @$(MAKE) proto-gen + @if git diff --quiet; then \ + echo "No files were modified after running 'make proto-gen'. Pass!"; \ + else \ + echo "Error: Files were modified after running 'make proto-gen'. Please commit changes to .pb files"; \ + exit 1; \ + fi proto-format: @echo "Formatting Protobuf files"