2024-11-26 04:34:01 -06:00
|
|
|
# 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
|
|
|
|
|
|
|
|
|
2024-11-29 18:15:25 -06:00
|
|
|
all: gitTag.pb.go goDep.pb.go repo.pb.go
|
2024-11-27 21:40:06 -06:00
|
|
|
make -C scanGoSrc/
|
2024-11-26 04:34:01 -06:00
|
|
|
|
|
|
|
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
|
2024-11-28 08:54:47 -06:00
|
|
|
make -C scanGoSrc/ goimports
|
2024-11-26 04:34:01 -06:00
|
|
|
|
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|
2024-11-29 21:51:30 -06:00
|
|
|
go mod edit -go=1.20
|
2024-11-26 04:34:01 -06:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.pb.go
|
|
|
|
-rm -f go.*
|
2024-11-27 21:43:40 -06:00
|
|
|
make -C scanGoSrc clean
|
2024-11-26 04:34:01 -06:00
|
|
|
|
2024-11-29 18:15:25 -06:00
|
|
|
#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
|
2024-11-26 05:34:26 -06:00
|
|
|
|
2024-11-29 18:15:25 -06:00
|
|
|
gitTag.pb.go: gitTag.proto
|
2024-11-29 01:23:51 -06:00
|
|
|
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
|
2024-11-29 18:15:25 -06:00
|
|
|
--go_opt=MgitTag.proto=go.wit.com/lib/protobuf/gitpb \
|
|
|
|
gitTag.proto
|
|
|
|
autogenpb --proto gitTag.proto --sort "ByName,Refname" --sort "ByHash,Hash" --no-marshal
|
2024-11-29 01:23:51 -06:00
|
|
|
|
2024-11-29 18:15:25 -06:00
|
|
|
goDep.pb.go: goDep.proto
|
2024-11-26 05:34:26 -06:00
|
|
|
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
|
2024-11-29 18:15:25 -06:00
|
|
|
--go_opt=MgoDep.proto=go.wit.com/lib/protobuf/gitpb \
|
|
|
|
goDep.proto
|
2024-11-29 21:51:30 -06:00
|
|
|
autogenpb --proto goDep.proto --sort "ByPath,GoPath" --sort "ByHash,Hash" --no-marshal
|
2024-11-27 13:57:17 -06:00
|
|
|
|
2024-11-29 16:22:19 -06:00
|
|
|
repo.pb.go: repo.proto
|
2024-11-27 13:57:17 -06:00
|
|
|
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/gitpb \
|
|
|
|
--go_opt=Mrefs.proto=go.wit.com/lib/protobuf/gitpb \
|
2024-11-29 18:15:25 -06:00
|
|
|
--go_opt=MgoDep.proto=go.wit.com/lib/protobuf/gitpb \
|
2024-11-29 16:22:19 -06:00
|
|
|
--go_opt=Mrepo.proto=go.wit.com/lib/protobuf/gitpb \
|
2024-11-29 18:15:25 -06:00
|
|
|
--go_opt=MgitTag.proto=go.wit.com/lib/protobuf/gitpb \
|
2024-11-29 16:22:19 -06:00
|
|
|
repo.proto
|
|
|
|
autogenpb --proto repo.proto --sort "ByPath,GoPath"
|