#!/usr/bin/make -f

# Ship only the generated code, discard other files
export DH_GOLANG_EXCLUDES := (^|/)(tools|e2e|examples|proto)(/|$$)

%:
	dh $@ --buildsystem=golang

# Generate the Go code that buf.build serves, using plain protoc
execute_before_dh_auto_configure:
	protoc -I proto/protovalidate --go_out=. \
		--go_opt=paths=source_relative,default_api_level=API_HYBRID \
		buf/validate/validate.proto

execute_after_dh_auto_clean:
	rm -rf buf
