diff --git a/go/Makefile b/go/Makefile index b8f40085..6fa41137 100644 --- a/go/Makefile +++ b/go/Makefile @@ -27,7 +27,7 @@ unittest: go.unittest .PHONY: unittest -generate: pb.generate +generate: pb.generate pkger.generate .PHONY: generate @@ -170,9 +170,9 @@ $(gen_sum): $(gen_src) generate_local: $(call check-program, shasum protoc) - go run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/bertymessenger.proto -o ../api/bertymessenger.yaml - go run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/bertyprotocol.proto -o ../api/bertyprotocol.yaml - go run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/bertyreplication.proto -o ../api/bertyreplication.yaml + $(GO) run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/bertymessenger.proto -o ../api/bertymessenger.yaml + $(GO) run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/bertyprotocol.proto -o ../api/bertyprotocol.yaml + $(GO) run github.com/buicongtan1997/protoc-gen-swagger-config -i ../api/bertyreplication.proto -o ../api/bertyreplication.yaml protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src ../api/errcode.proto protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src ../api/bertybridge.proto protoc $(protoc_opts) --gogo_out=plugins=grpc:$(GOPATH)/src ../api/bertytypes.proto @@ -195,6 +195,9 @@ go.fmt: go run mvdan.cc/gofumpt -w -s . .PHONY: go.fmt +pkger.generate: + $(GO) run github.com/markbates/pkger/cmd/pkger -o go/assets/ +.PHONY: pkger.generate gen.clean: rm -f gen.sum $(wildcard */*/*.pb.go) $(wildcard */*/*pb_test.go) $(wildcard */*/*pb.gw.go) diff --git a/go/internal/tools/tools_untool.go b/go/internal/tools/tools_untool.go new file mode 100644 index 00000000..a3644052 --- /dev/null +++ b/go/internal/tools/tools_untool.go @@ -0,0 +1,8 @@ +// +build !tools + +// Package tools ensures that `go mod` detect some required dependencies. +// +// This package should not be imported directly. +// +// This file is a noop to make `go list` happy. +package tools