2024-11-20 09:31:24 -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-27 21:21:06 -06:00
|
|
|
all: forgeConfig.pb.go
|
2024-11-28 08:35:39 -06:00
|
|
|
reset
|
2024-11-20 11:08:12 -06:00
|
|
|
make -C forgeConfig
|
2024-11-20 09:31:24 -06:00
|
|
|
|
|
|
|
vet: lint
|
|
|
|
GO111MODULE=off go vet
|
|
|
|
|
|
|
|
lint:
|
|
|
|
-buf lint repo.proto
|
|
|
|
|
|
|
|
# autofixes your import headers in your golang files
|
|
|
|
goimports:
|
|
|
|
goimports -w *.go
|
2024-11-20 11:08:12 -06:00
|
|
|
make -C forgeConfig goimports
|
2024-11-20 09:31:24 -06:00
|
|
|
|
|
|
|
redomod:
|
|
|
|
rm -f go.*
|
|
|
|
GO111MODULE= go mod init
|
|
|
|
GO111MODULE= go mod tidy
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.pb.go
|
|
|
|
-rm -f go.*
|
2024-11-20 11:08:12 -06:00
|
|
|
make -C forgeConfig clean
|
2024-11-20 09:31:24 -06:00
|
|
|
|
2024-11-28 08:35:39 -06:00
|
|
|
install:
|
|
|
|
make -C forgeConfig install
|
|
|
|
|
2024-11-29 13:27:32 -06:00
|
|
|
autogenpb:
|
2024-11-29 14:37:32 -06:00
|
|
|
autogenpb --proto forgeConfig.proto --sort "ByPath,GoPath" --marshal ForgeConfigs
|
2024-11-29 13:27:32 -06:00
|
|
|
|
2024-11-27 21:05:12 -06:00
|
|
|
forgeConfig.pb.go: forgeConfig.proto
|
|
|
|
# I'm using version v1.35.x from google.golang.org/protobuf/cmd/protoc-gen-go
|
|
|
|
cd ~/go/src && protoc --go_out=. --proto_path=go.wit.com/lib/protobuf/forgepb \
|
|
|
|
--go_opt=MforgeConfig.proto=go.wit.com/lib/protobuf/forgepb \
|
|
|
|
forgeConfig.proto
|