<commit_before>export PATH := $(GOPATH)/bin:$(PATH)

# all proto files in subfolders
PROTO_FILES=$(shell find . -name "*.proto" | grep -v node_modules)

# includes for all subfolders containing proto files, e.g. `-I./path/to/proto/folder`
INCL_PROTO_DIR=$(shell find . -name "*.proto" -exec dirname {} \; | grep -v node_modules | sort -u | sed -e 's/^/-I/')
INCL_WKT=-I $$GOPATH/src/github.com/golang/protobuf/ptypes/struct

PROTO_PREFIX=import_prefix_proto=github.com/ketchuphq/ketchup/proto/

protos:
	@mkdir -p proto
	protoc $(INCL_PROTO_DIR) $(INCL_WKT) $(PROTO_FILES) $$GOPATH/src/github.com/golang/protobuf/ptypes/struct/struct.proto --go-2_out=$(PROTO_PREFIX),plugins=setter:./proto
	go run util/gots/main.go ./admin/src/js/lib/api.ts

protos-list:
	@echo $(PROTO_FILES) | tr " " "\n"

prepare-protos:
	brew install grpc/grpc/google-protobuf
	go get -u github.com/octavore/protobuf/protoc-gen-go-2<commit_msg>make: Update protobuf install.<commit_after>export PATH := $(GOPATH)/bin:$(PATH)

# all proto files in subfolders
PROTO_FILES=$(shell find . -name "*.proto" | grep -v node_modules)

# includes for all subfolders containing proto files, e.g. `-I./path/to/proto/folder`
INCL_PROTO_DIR=$(shell find . -name "*.proto" -exec dirname {} \; | grep -v node_modules | sort -u | sed -e 's/^/-I/')
INCL_WKT=-I $$GOPATH/src/github.com/golang/protobuf/ptypes/struct

PROTO_PREFIX=import_prefix_proto=github.com/ketchuphq/ketchup/proto/

protos:
	@mkdir -p proto
	protoc $(INCL_PROTO_DIR) $(INCL_WKT) $(PROTO_FILES) $$GOPATH/src/github.com/golang/protobuf/ptypes/struct/struct.proto --go-2_out=$(PROTO_PREFIX),plugins=setter:./proto
	go run util/gots/main.go ./admin/src/js/lib/api.ts

protos-list:
	@echo $(PROTO_FILES) | tr " " "\n"

prepare-protos:
	brew install protobuf
	go get -u github.com/octavore/protobuf/protoc-gen-go-2
{'fraction_non_alphanumeric': 0.1675764192139738, 'fraction_numerical': 0.002183406113537118, 'mean_word_length': 4.359649122807017, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5952740', 'n_tokens_mistral': 730, 'n_tokens_neox': 700, 'n_words': 138}