From ddd73ad300394f7ffba7d09864a8155390ec95f4 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Fri, 27 Oct 2023 15:44:23 -0700 Subject: [PATCH] Move protofiles generated into v2 directory Protobuf will automatically put the files generated for a v2 module into a v2 directory. Move them to their correct location after running the protobuild. Signed-off-by: Derek McGowan --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d9a292124..2762fdd8a 100644 --- a/Makefile +++ b/Makefile @@ -179,8 +179,9 @@ protos: bin/protoc-gen-go-fieldpath @mv ${ROOTDIR}/vendor ${TMPDIR} @(cd ${ROOTDIR}/api && PATH="${ROOTDIR}/bin:${PATH}" protobuild --quiet ${API_PACKAGES}) @(PATH="${ROOTDIR}/bin:${PATH}" protobuild --quiet ${NON_API_PACKAGES}) + find v2 -name '*.pb.go' -exec sh -c 'f={}; mkdir -p $$(dirname "$${f#v2/}"); echo mv $$f $${f#v2/}; mv $$f $${f#v2/}' \; @mv ${TMPDIR}/vendor ${ROOTDIR} - @rm -rf ${TMPDIR} + @rm -rf ${TMPDIR} v2 go-fix-acronym -w -a '(Id|Io|Uuid|Os)$$' $(shell find api/ runtime/ -name '*.pb.go') check-protos: protos ## check if protobufs needs to be generated again