From 280d052cefa0bb00134fff80fb1c6aed31e7e934 Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Thu, 8 Aug 2024 17:31:58 +0300 Subject: [PATCH] [#101] Remove usage of folder `vendor` Signed-off-by: Anton Nikiforov --- .gitignore | 1 - Makefile | 5 ++--- prepare.sh | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 354a562..30476bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ .idea bin temp -/vendor/ diff --git a/Makefile b/Makefile index 7789692..30d599d 100755 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ fmts: fumpt imports # Reformat imports imports: @echo "⇒ Processing goimports check" - @for f in `find . -type f -name '*.go' -not -path './vendor/*' -not -name '*.pb.go' -prune`; do \ + @for f in `find . -type f -name '*.go' -not -name '*.pb.go' -prune`; do \ goimports -w $$f; \ done @@ -64,13 +64,12 @@ protoc: @for f in `find . -type f -name '*.proto'`; do \ echo "⇒ Processing $$f "; \ $(PROTOC_DIR)/bin/protoc \ - --proto_path=.:./vendor:/usr/local/include \ + --proto_path=.:/usr/local/include \ --plugin=protoc-gen-go=$(PROTOC_GEN_GO_DIR)/protoc-gen-go \ --go_out=. --go_opt=paths=source_relative \ --go-grpc_opt=require_unimplemented_servers=false \ --go-grpc_out=. --go-grpc_opt=paths=source_relative $$f; \ done - rm -rf vendor # Run Unit Test with go test test: GOFLAGS ?= "-count=1" diff --git a/prepare.sh b/prepare.sh index 32048b3..4b8b125 100755 --- a/prepare.sh +++ b/prepare.sh @@ -10,7 +10,7 @@ API_PATH=$1 # MOVE FILES FROM API REPO cd "$API_PATH" || exit 1 -ARGS=$(find ./ -name '*.proto' -not -path './vendor/*') +ARGS=$(find ./ -name '*.proto') for file in $ARGS; do dir=$(dirname "$file") mkdir -p "$API_GO_PATH/$dir/grpc" @@ -30,7 +30,7 @@ cd "$API_GO_PATH" || exit 1 make protoc # REMOVE PROTO DEFINITIONS -ARGS=$(find ./$prefix -name '*.proto' -not -path './vendor/*' -not -path './util/*') +ARGS=$(find ./$prefix -name '*.proto' -not -path './util/*') for file in $ARGS; do rm "$file" done