46 lines
951 B
Makefile
46 lines
951 B
Makefile
# 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: gitTag.pb.go goDep.pb.go repo.pb.go vet
|
|
|
|
test:
|
|
make -C scanGoSrc/
|
|
|
|
vet:
|
|
@GO111MODULE=off go vet
|
|
@echo this go library package builds okay
|
|
|
|
# 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
|
|
go mod edit -go=1.20
|
|
|
|
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
|
|
|
|
gitTag.pb.go: gitTag.proto
|
|
autogenpb --proto gitTag.proto --mutex
|
|
|
|
goDep.pb.go: goDep.proto
|
|
autogenpb --proto goDep.proto --mutex
|
|
|
|
repo.pb.go: repo.proto
|
|
autogenpb --proto repo.proto --mutex
|