File tree Expand file tree Collapse file tree 4 files changed +7
-633
lines changed
Expand file tree Collapse file tree 4 files changed +7
-633
lines changed Original file line number Diff line number Diff line change 3131protoc \
3232 --go-grpc_out=" ${TEMPDIR} " \
3333 --go-grpc_opt=paths=source_relative \
34- " $WORKDIR /testdata/golden .proto"
34+ " examples/route_guide/routeguide/route_guide .proto"
3535
36- GOLDENFILE=" ${WORKDIR} /testdata/golden_grpc .pb.go"
37- GENFILE=" ${TEMPDIR} /cmd/protoc-gen-go-grpc/testdata/golden_grpc .pb.go"
36+ GOLDENFILE=" examples/route_guide/routeguide/route_guide_grpc .pb.go"
37+ GENFILE=" ${TEMPDIR} /examples/route_guide/routeguide/route_guide_grpc .pb.go"
3838
39- DIFF=$( diff " ${GOLDENFILE} " " ${GENFILE} " )
39+ # diff is piped to [[ $? == 1 ]] to avoid exiting on diff but exit on error
40+ # (like if the file was not found). See man diff for more info.
41+ DIFF=$( diff " ${GOLDENFILE} " " ${GENFILE} " || [[ $? == 1 ]])
4042if [[ -n " ${DIFF} " ]]; then
41- echo -e " ERROR: Generated file golden_grpc.pb.go differs from golden file:\n${DIFF} "
43+ echo -e " ERROR: Generated file differs from golden file:\n${DIFF} "
4244 echo -e " If you have made recent changes to protoc-gen-go-grpc," \
4345 " please regenerate the golden files by running:" \
4446 " \n\t go generate google.golang.org/grpc/..." >&2
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments