Skip to content

Commit

Permalink
perf: Add assets bundle and fake file.
Browse files Browse the repository at this point in the history
Signed-off-by: Jorropo <jorropo.pgm@gmail.com>
  • Loading branch information
Jorropo committed Sep 26, 2020
1 parent 5a757d2 commit 7d8d9c0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
11 changes: 7 additions & 4 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ unittest: go.unittest
.PHONY: unittest


generate: pb.generate
generate: pb.generate pkger.generate
.PHONY: generate


Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
8 changes: 8 additions & 0 deletions go/internal/tools/tools_untool.go
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7d8d9c0

Please sign in to comment.