diff options
| -rw-r--r-- | Makefile | 13 | ||||
| -rw-r--r-- | init.go | 11 |
2 files changed, 20 insertions, 4 deletions
@@ -8,7 +8,15 @@ all: forgeConfig.pb.go patch.pb.go set.pb.go goimports vet generate: clean - autogenpb --proto patchset.proto + go mod init + go mod tidy + go generate + +go-generate: + rm -f *.pb.go *.patch + go get go.wit.com/apps/autogenpb + +forgeConfig.pb.go: forgeConfig.proto autogenpb --proto forgeConfig.proto vet: @@ -24,9 +32,6 @@ clean: -rm -f go.* go-mod-clean purge -forgeConfig.pb.go: forgeConfig.proto - autogenpb --proto forgeConfig.proto - # patchset.pb.go: patchset.proto # autogenpb --proto patchset.proto @@ -1,4 +1,15 @@ // Copyright 2025 WIT.COM Inc Licensed GPL 3.0 +// +// NOTE: it would be helpful if go.mod doesn't exist, that go generate +// would automatically run go mod init and go mod tidy +// and allow directives to 'go get go.wit.com/apps/autogenpb' +// then this process could be fully automated +// +//go:generate make go-generate +//go:generate go install -v go.wit.com/apps/autogenpb +//go:generate autogenpb --proto forgeConfig.proto +//go:generate autogenpb --proto patch.proto +//go:generate autogenpb --proto set.proto package forgepb |
