Remove usage of folder vendor
#102
3 changed files with 6 additions and 8 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,4 +1,3 @@
|
|||
.idea
|
||||
bin
|
||||
temp
|
||||
/vendor/
|
||||
|
|
7
Makefile
7
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
|
||||
|
||||
|
@ -61,16 +61,15 @@ protoc:
|
|||
make protoc-install; \
|
||||
fi
|
||||
# Protoc generate
|
||||
@for f in `find . -type f -name '*.proto'`; do \
|
||||
@for f in `find . -type f -name '*.proto' -not -path './bin/*'`; do \
|
||||
echo "⇒ Processing $$f "; \
|
||||
$(PROTOC_DIR)/bin/protoc \
|
||||
--proto_path=.:./vendor:/usr/local/include \
|
||||
--proto_path=.:$(PROTOC_DIR)/include:/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"
|
||||
|
|
|
@ -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' -not -path './bin/*')
|
||||
for file in $ARGS; do
|
||||
dir=$(dirname "$file")
|
||||
mkdir -p "$API_GO_PATH/$dir/grpc"
|
||||
|
@ -19,7 +19,7 @@ done
|
|||
|
||||
# MODIFY FILES
|
||||
cd "$API_GO_PATH" || exit 1
|
||||
ARGS2=$(find ./ -name '*.proto')
|
||||
ARGS2=$(find ./ -name '*.proto' -not -path './bin/*')
|
||||
for file in $ARGS2; do
|
||||
echo "$file"
|
||||
sed -i "s/import\ \"\(.*\)\/\(.*\)\.proto\";/import\ \"\1\/grpc\/\2\.proto\";/" $file
|
||||
|
@ -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/*' -not -path './bin/*')
|
||||
for file in $ARGS; do
|
||||
rm "$file"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue