diff --git a/.github/workflows/proto-schema-compatibility.yml b/.github/workflows/proto-schema-compatibility.yml index 72991de..47eb467 100644 --- a/.github/workflows/proto-schema-compatibility.yml +++ b/.github/workflows/proto-schema-compatibility.yml @@ -51,4 +51,12 @@ jobs: - name: Run ProtoBuf Backward compatibility changes run: | java -jar schemata.jar isBackwardCompatible -s model.desc -b base-branch/model.desc -p protobuf + exit_code=$? + if [ $exit_code -eq 0 ]; then + echo "ProtoBuf Backward compatibility check passed" + else + echo "ProtoBuf Backward compatibility check failed" + java -jar schemata.jar compatibilitySummary -s model.desc -b base-branch/model.desc -p protobuf + exit 1 + fi diff --git a/src/main/java/org/schemata/SchemataExecutor.java b/src/main/java/org/schemata/SchemataExecutor.java index 7e43ad9..8bc7503 100644 --- a/src/main/java/org/schemata/SchemataExecutor.java +++ b/src/main/java/org/schemata/SchemataExecutor.java @@ -70,7 +70,6 @@ public int compatibilitySummary() { System.out.println("Schema is backward compatible"); return 0; } else { - System.out.println("Schema is not backward compatible"); System.out.println("Incompatible fields:"); checker.summary().forEach(System.out::println); return 1;