[#101] Remove usage of folder vendor

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2024-08-08 17:31:58 +03:00
parent 35e7397d48
commit 280d052cef
3 changed files with 4 additions and 6 deletions

1
.gitignore vendored
View file

@ -1,4 +1,3 @@
.idea .idea
bin bin
temp temp
/vendor/

View file

@ -34,7 +34,7 @@ fmts: fumpt imports
# Reformat imports # Reformat imports
imports: imports:
@echo "⇒ Processing goimports check" @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; \ goimports -w $$f; \
done done
@ -64,13 +64,12 @@ protoc:
@for f in `find . -type f -name '*.proto'`; do \ @for f in `find . -type f -name '*.proto'`; do \
echo "⇒ Processing $$f "; \ echo "⇒ Processing $$f "; \
$(PROTOC_DIR)/bin/protoc \ $(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 \ --plugin=protoc-gen-go=$(PROTOC_GEN_GO_DIR)/protoc-gen-go \
--go_out=. --go_opt=paths=source_relative \ --go_out=. --go_opt=paths=source_relative \
--go-grpc_opt=require_unimplemented_servers=false \ --go-grpc_opt=require_unimplemented_servers=false \
--go-grpc_out=. --go-grpc_opt=paths=source_relative $$f; \ --go-grpc_out=. --go-grpc_opt=paths=source_relative $$f; \
done done
rm -rf vendor
# Run Unit Test with go test # Run Unit Test with go test
test: GOFLAGS ?= "-count=1" test: GOFLAGS ?= "-count=1"

View file

@ -10,7 +10,7 @@ API_PATH=$1
# MOVE FILES FROM API REPO # MOVE FILES FROM API REPO
cd "$API_PATH" || exit 1 cd "$API_PATH" || exit 1
ARGS=$(find ./ -name '*.proto' -not -path './vendor/*') ARGS=$(find ./ -name '*.proto')
for file in $ARGS; do for file in $ARGS; do
dir=$(dirname "$file") dir=$(dirname "$file")
mkdir -p "$API_GO_PATH/$dir/grpc" mkdir -p "$API_GO_PATH/$dir/grpc"
@ -30,7 +30,7 @@ cd "$API_GO_PATH" || exit 1
make protoc make protoc
# REMOVE PROTO DEFINITIONS # 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 for file in $ARGS; do
rm "$file" rm "$file"
done done