Skip to content

Commit e9dd57e

Browse files
committed
ci: fix typo in vtprotobuf disable logic
Without this fix, vtprotobuf is accidentally enabled for everyone instead of just opt-in. Fixing envoyproxy#31172 Signed-off-by: John Howard <[email protected]>
1 parent 2e36903 commit e9dd57e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ci/do_ci.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,10 @@ case $CI_TARGET in
310310
fi
311311
# TODO(https://github.com/planetscale/vtprotobuf/pull/122) do this directly in the generator.
312312
# Make vtprotobuf opt-in as it has some impact on binary sizes
313-
if [[ "$GO_FILE" = *.vtproto.pb.go ]]; then
314-
sed -i '1s;^;//go:build vtprotobuf\n;' "$OUTPUT_DIR/$(basename "$GO_FILE")"
313+
if [[ "$GO_FILE" = *_vtproto.pb.go ]]; then
314+
if ! grep -q 'package ignore' "$GO_FILE"; then
315+
sed -i '1s;^;//go:build vtprotobuf\n// +build vtprotobuf\n;' "$OUTPUT_DIR/$(basename "$GO_FILE")"
316+
fi
315317
fi
316318
done <<< "$(find "$INPUT_DIR" -name "*.go")"
317319
done

0 commit comments

Comments
 (0)