blob: ffbb48f0e08cb4643544a2d15b613f77a5ea7808 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# You must use the current protoc-gen-go
#
# go-clone --go-src google.golang.org/protobuf
# cd ~/go/src/google.golang.org/protobuf/cmd/protoc-gen-go
# go install
all: refs.pb.go gitTags.pb.go godep.pb.go repos.pb.go vet
make -C scanGoSrc/
vet: lint
GO111MODULE=off go vet
lint:
# -buf lint refs.proto # todo: figure out where buf comes from again
# autofixes your import headers in your golang files
goimports:
goimports -w *.go
make -C scanGoSrc/ goimports
redomod:
rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy
clean:
rm -f *.pb.go
-rm -f go.*
make -C scanGoSrc clean
refs.pb.go: refs.proto
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
--go_opt=Mrefs.proto=go.wit.com/lib/protobuf/gitpb \
refs.proto
gitTags.pb.go: gitTags.proto
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
--go_opt=MgitTags.proto=go.wit.com/lib/protobuf/gitpb \
gitTags.proto
godep.pb.go: godep.proto
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
--go_opt=Mgodep.proto=go.wit.com/lib/protobuf/gitpb \
godep.proto
repos.pb.go: repos.proto
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
--go_opt=Mrefs.proto=go.wit.com/lib/protobuf/gitpb \
--go_opt=Mgodep.proto=go.wit.com/lib/protobuf/gitpb \
--go_opt=Mrepos.proto=go.wit.com/lib/protobuf/gitpb \
--go_opt=MgitTags.proto=go.wit.com/lib/protobuf/gitpb \
repos.proto
|